Class: Locomotive::RelationalAlgebra::AttachItem

Inherits:
Object
  • Object
show all
Includes:
XML
Defined in:
lib/locomotive/relational_algebra/operators/projections/attach.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XML

included, #quote

Constructor Details

#initialize(attr, atom) ⇒ AttachItem

Returns a new instance of AttachItem.



14
15
16
17
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 14

def initialize(attr, atom)
  self.attribute,
  self.atom = attr, atom
end

Instance Attribute Details

#atomObject

Returns the value of attribute atom.



11
12
13
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 11

def atom
  @atom
end

#attributeObject

Returns the value of attribute attribute.



9
10
11
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 9

def attribute
  @attribute
end

Instance Method Details

#cloneObject



26
27
28
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 26

def clone
  AttachItem.new(attribute, atom)
end

#to_xmlObject



19
20
21
22
23
24
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 19

def to_xml
  column :name => attribute.to_xml,
         :new => true do
    atom.to_xml
  end 
end