Class: YARD::Templates::TemplateOptions
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::YARD::Options
|
|
Instance Chain:
self,
::YARD::Options
|
|
Inherits: |
YARD::Options
|
Defined in: | lib/yard/templates/template_options.rb |
Overview
An Options class containing default options for base template rendering. For
options specific to generation of HTML output, see ::YARD::CLI::YardocOptions
.
Class Method Summary
::YARD::Options
- Inherited
.default_attr | Defines an attribute named |
Instance Attribute Summary
-
#__globals
readonly
Alias for #globals.
- #default_return ⇒ String rw
- #embed_mixins ⇒ Array<String> rw
- #format ⇒ Symbol rw
- #globals ⇒ OpenStruct (also: #__globals) rw
- #hide_void_return ⇒ Boolean rw
- #highlight ⇒ Boolean rw
- #index ⇒ Boolean rw
- #markup ⇒ Symbol rw
- #markup_provider ⇒ Class rw
-
#no_highlight ⇒ Boolean
rw
deprecated
Deprecated.
use #highlight instead.
- #no_highlight=(value) rw
- #object ⇒ CodeObjects::Base rw
- #owner ⇒ CodeObjects::Base rw
- #page_title ⇒ String rw
- #serialize ⇒ Boolean rw
- #serializer ⇒ Serializers::Base rw
- #template ⇒ Symbol rw
- #type ⇒ Symbol rw
- #verifier ⇒ Verifier rw
Instance Method Summary
::YARD::Options
- Inherited
#==, | |
#[] | Delegates calls with |
#[]= | Delegates setter calls with |
#delete | Deletes an option value for |
#each | Yields over every option key and value. |
#inspect | Inspects the object. |
#merge | Creates a new options object and sets options hash or object value onto that object. |
#method_missing | Handles setting and accessing of unregistered keys similar to an |
#reset_defaults | Resets all values to their defaults. |
#tap | only for 1.8.6. |
#to_hash, | |
#update | Updates values from an options hash or options object on this object. |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class YARD::Options
Instance Attribute Details
#__globals (readonly)
Alias for #globals.
# File 'lib/yard/templates/template_options.rb', line 34
alias __globals globals
#default_return ⇒ String (rw)
# File 'lib/yard/templates/template_options.rb', line 20
default_attr :default_return, "Object"
#embed_mixins ⇒ Array<String> (rw)
# File 'lib/yard/templates/template_options.rb', line 71
default_attr :, lambda { [] }
#format ⇒ Symbol
(rw)
# File 'lib/yard/templates/template_options.rb', line 11
default_attr :format, :text
#globals ⇒ OpenStruct (rw) Also known as: #__globals
# File 'lib/yard/templates/template_options.rb', line 33
default_attr :globals, lambda { OpenStruct.new }
#hide_void_return ⇒ Boolean
(rw)
# File 'lib/yard/templates/template_options.rb', line 23
default_attr :hide_void_return, false
#highlight ⇒ Boolean
(rw)
# File 'lib/yard/templates/template_options.rb', line 26
default_attr :highlight, true
#index ⇒ Boolean
(rw)
# File 'lib/yard/templates/template_options.rb', line 63
attr_accessor :index
#markup ⇒ Symbol
(rw)
# File 'lib/yard/templates/template_options.rb', line 17
default_attr :markup, :rdoc # default is :rdoc but falls back on :none
#markup_provider ⇒ Class
(rw)
# File 'lib/yard/templates/template_options.rb', line 29
attr_accessor :markup_provider
#no_highlight ⇒ Boolean
(rw)
use #highlight instead.
# File 'lib/yard/templates/template_options.rb', line 56
attr_reader :no_highlight
#no_highlight=(value) (rw)
[ GitHub ]# File 'lib/yard/templates/template_options.rb', line 57
def no_highlight=(value) self.highlight = !value end
#object ⇒ CodeObjects::Base (rw)
# File 'lib/yard/templates/template_options.rb', line 37
attr_accessor :object
#owner ⇒ CodeObjects::Base (rw)
# File 'lib/yard/templates/template_options.rb', line 40
attr_accessor :owner
#page_title ⇒ String (rw)
# File 'lib/yard/templates/template_options.rb', line 60
attr_accessor :page_title
#serialize ⇒ Boolean
(rw)
# File 'lib/yard/templates/template_options.rb', line 46
default_attr :serialize, true
#serializer ⇒ Serializers::Base (rw)
# File 'lib/yard/templates/template_options.rb', line 50
attr_accessor :serializer
#template ⇒ Symbol
(rw)
# File 'lib/yard/templates/template_options.rb', line 14
default_attr :template, :default
#type ⇒ Symbol
(rw)
# File 'lib/yard/templates/template_options.rb', line 43
attr_accessor :type
#verifier ⇒ Verifier (rw)
# File 'lib/yard/templates/template_options.rb', line 88
attr_accessor :verifier
Instance Method Details
#embed_mixins_match?(mixin) ⇒ Boolean
?
# File 'lib/yard/templates/template_options.rb', line 77
def (mixin) return true if mixin == object # the method is not inherited return nil unless mixin.is_a?(CodeObjects::ModuleObject) .any? do || re = /\A#{Regexp.quote( ).gsub('\*', '.*')}\Z/ matchstr = .include?("::") ? mixin.path : mixin.name re.match(matchstr.to_s) end end