Class: Locomotive::RelationalAlgebra::LiteralList
- Inherits:
-
Object
- Object
- Locomotive::RelationalAlgebra::LiteralList
- Includes:
- XML
- Defined in:
- lib/locomotive/relational_algebra/operators/tables/literal_table.rb
Instance Method Summary collapse
- #attributes ⇒ Object
- #clone ⇒ Object
-
#initialize(hash) ⇒ LiteralList
constructor
A new instance of LiteralList.
- #to_xml ⇒ Object
Methods included from XML
Constructor Details
#initialize(hash) ⇒ LiteralList
Returns a new instance of LiteralList.
21 22 23 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 21 def initialize(hash) self.literal_list = hash end |
Instance Method Details
#attributes ⇒ Object
25 26 27 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 25 def attributes literal_list.keys end |
#clone ⇒ Object
39 40 41 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 39 def clone LiteralList.new( literal_list.clone ) end |
#to_xml ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 29 def to_xml literal_list.collect do |attr,atomary| column :name => attr.to_xml, :new => true do atomary.collect do |atom| atom.to_xml end.join end end.join end |