Class: Ruby::Tags::Group
- Inherits:
-
Object
- Object
- Ruby::Tags::Group
- Defined in:
- lib/ruby/tags/tags.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #add(tag) ⇒ Object
-
#initialize(*tags) ⇒ Group
constructor
A new instance of Group.
- #render ⇒ Object
Constructor Details
#initialize(*tags) ⇒ Group
Returns a new instance of Group.
6 7 8 |
# File 'lib/ruby/tags/tags.rb', line 6 def initialize(*) @tags = end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 |
# File 'lib/ruby/tags/tags.rb', line 19 def ==(other) @tags == other.instance_variable_get(:@tags) end |
#add(tag) ⇒ Object
14 15 16 17 |
# File 'lib/ruby/tags/tags.rb', line 14 def add(tag) @tags << tag self end |
#render ⇒ Object
10 11 12 |
# File 'lib/ruby/tags/tags.rb', line 10 def render @tags.map(&:render).join end |