Class: Arbo::ElementCollection
- Inherits:
-
Array
- Object
- Array
- Arbo::ElementCollection
- Defined in:
- lib/arbo/element_collection.rb
Overview
Stores a collection of Element objects
Instance Method Summary collapse
- #&(other) ⇒ Object
- #+(other) ⇒ Object
- #-(other) ⇒ Object
- #render_in(context) ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#&(other) ⇒ Object
14 15 16 |
# File 'lib/arbo/element_collection.rb', line 14 def &(other) self.class.new(super) end |
#+(other) ⇒ Object
6 7 8 |
# File 'lib/arbo/element_collection.rb', line 6 def +(other) self.class.new(super) end |
#-(other) ⇒ Object
10 11 12 |
# File 'lib/arbo/element_collection.rb', line 10 def -(other) self.class.new(super) end |
#render_in(context) ⇒ Object
24 25 26 27 28 |
# File 'lib/arbo/element_collection.rb', line 24 def render_in(context) self.collect do |element| element.render_in(context) end.join('').html_safe end |
#to_s ⇒ Object
18 19 20 21 22 |
# File 'lib/arbo/element_collection.rb', line 18 def to_s self.collect do |element| element.to_s end.join('').html_safe end |