Class: Lookbook::YardTag

Inherits:
YARD::Tags::Tag
  • Object
show all
Defined in:
lib/lookbook/tags/yard_tag.rb

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

Instance Method Details

#optionsObject



16
17
18
# File 'lib/lookbook/tags/yard_tag.rb', line 16

def options
  tag_parts[:options]
end

#textObject Also known as: value



12
13
14
# File 'lib/lookbook/tags/yard_tag.rb', line 12

def text
  tag_parts[:text]
end

#to_sObject



20
21
22
# File 'lib/lookbook/tags/yard_tag.rb', line 20

def to_s
  value.to_s
end