Class: Locomotive::RelationalAlgebra::RAtomic
- Inherits:
-
Object
- Object
- Locomotive::RelationalAlgebra::RAtomic
- Extended by:
- TypeChecking::Signature
- Includes:
- XML
- Defined in:
- lib/locomotive/relational_algebra/types.rb
Overview
An atomic value constists of a value an its associated type
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize(val, ty) ⇒ RAtomic
constructor
A new instance of RAtomic.
- #to_xml ⇒ Object
Methods included from TypeChecking::Signature
Methods included from XML
Constructor Details
#initialize(val, ty) ⇒ RAtomic
Returns a new instance of RAtomic.
57 58 59 60 |
# File 'lib/locomotive/relational_algebra/types.rb', line 57 def initialize(val, ty) self.value, self.type = val, ty end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
53 54 55 |
# File 'lib/locomotive/relational_algebra/types.rb', line 53 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
53 54 55 |
# File 'lib/locomotive/relational_algebra/types.rb', line 53 def value @value end |
Instance Method Details
#clone ⇒ Object
68 69 70 71 |
# File 'lib/locomotive/relational_algebra/types.rb', line 68 def clone RAtomic.new(self.value, self.type) end |
#to_xml ⇒ Object
62 63 64 65 66 |
# File 'lib/locomotive/relational_algebra/types.rb', line 62 def to_xml _value_ :type => type.to_xml do value end end |