Class: Locomotive::RelationalAlgebra::RType
- Inherits:
-
Object
- Object
- Locomotive::RelationalAlgebra::RType
- Includes:
- XML, Singleton
- Defined in:
- lib/locomotive/relational_algebra/types.rb
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize ⇒ RType
constructor
A new instance of RType.
- #inspect ⇒ Object
- #to_xml ⇒ Object
Methods included from XML
Constructor Details
#initialize ⇒ RType
Returns a new instance of RType.
13 14 15 16 17 18 |
# File 'lib/locomotive/relational_algebra/types.rb', line 13 def initialize() if self.class == RType raise AbstractClassError, "#{self.class} is an abstract class" end end |
Instance Method Details
#clone ⇒ Object
20 21 22 23 24 |
# File 'lib/locomotive/relational_algebra/types.rb', line 20 def clone # since all types are singletons # we can return the object itself self end |
#inspect ⇒ Object
30 31 32 |
# File 'lib/locomotive/relational_algebra/types.rb', line 30 def inspect "<#{self.class.to_s.split('::').last}>" end |
#to_xml ⇒ Object
26 27 28 |
# File 'lib/locomotive/relational_algebra/types.rb', line 26 def to_xml self.class.to_s.split("::").last.downcase[1..-1] end |