Class: Lookbook::YardTag
- Inherits:
-
YARD::Tags::Tag
- Object
- YARD::Tags::Tag
- Lookbook::YardTag
show all
- Defined in:
- lib/lookbook/tags/yard_tag.rb
Direct Known Subclasses
AfterRenderTag, CustomTag, DisplayTag, HiddenTag, IdTag, LabelTag, LogicalPathTag, ParamTag, PriorityTag, RendersTag, SourceTag, TypeTag
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(*args) ⇒ YardTag
Returns a new instance of YardTag.
3
4
5
6
7
8
9
10
|
# File 'lib/lookbook/tags/yard_tag.rb', line 3
def initialize(*args)
if args.size < 2
tag_name = self.class.name.demodulize.underscore.chomp("_tag")
super(tag_name, args.first, nil, @name)
else
super(*args)
end
end
|
Class Method Details
.supports_options(value = true) ⇒ Object
29
30
31
|
# File 'lib/lookbook/tags/yard_tag.rb', line 29
def self.supports_options(value = true)
@supports_options = !!value
end
|
.supports_options? ⇒ Boolean
33
34
35
|
# File 'lib/lookbook/tags/yard_tag.rb', line 33
def self.supports_options?
@supports_options.nil? ? false : @supports_options
end
|
Instance Method Details
#options ⇒ Object
16
17
18
|
# File 'lib/lookbook/tags/yard_tag.rb', line 16
def options
tag_parts[:options]
end
|
#text ⇒ Object
Also known as:
value
12
13
14
|
# File 'lib/lookbook/tags/yard_tag.rb', line 12
def text
tag_parts[:text]
end
|
#to_s ⇒ Object
20
21
22
|
# File 'lib/lookbook/tags/yard_tag.rb', line 20
def to_s
value.to_s
end
|