Class: Arbre::ElementCollection

Inherits:
Array
  • Object
show all
Defined in:
lib/arbre/element_collection.rb

Overview

Stores a collection of Element objects

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



14
15
16
# File 'lib/arbre/element_collection.rb', line 14

def &(other)
  self.class.new(super)
end

#+(other) ⇒ Object



6
7
8
# File 'lib/arbre/element_collection.rb', line 6

def +(other)
  self.class.new(super)
end

#-(other) ⇒ Object



10
11
12
# File 'lib/arbre/element_collection.rb', line 10

def -(other)
  self.class.new(super)
end

#to_sObject



18
19
20
21
22
# File 'lib/arbre/element_collection.rb', line 18

def to_s
  self.collect do |element|
    element.to_s
  end.join('').html_safe
end