Class: RLTK::CG::NumberType Abstract
- Includes:
- Filigree::AbstractClass
- Defined in:
- lib/rltk/cg/type.rb
Overview
This class is abstract.
All types that are used to represent numbers inherit from this class.
Direct Known Subclasses
Instance Attribute Summary
Attributes included from BindingClass
Class Method Summary collapse
-
.value_class ⇒ Value
The corresponding Value sub-class that is used to represent values of this type.
Instance Method Summary collapse
-
#value_class ⇒ Value
The corresponding Value sub-class that is used to represent values of this type.
Methods inherited from Type
#allignment, #context, #dump, from_ptr, #hash, #initialize, #kind, #size, #to_s
Methods included from BindingClass
Constructor Details
This class inherits a constructor from RLTK::CG::Type
Class Method Details
.value_class ⇒ Value
Returns The corresponding Value sub-class that is used to represent values of this type.
124 125 126 127 128 129 130 131 132 |
# File 'lib/rltk/cg/type.rb', line 124 def self.value_class begin @value_class ||= RLTK::CG.const_get(self.name.match(/::(.+)Type$/).captures.last.to_sym) rescue raise "#{self.name} has no value class." end end |
Instance Method Details
#value_class ⇒ Value
Returns The corresponding Value sub-class that is used to represent values of this type.
135 136 137 |
# File 'lib/rltk/cg/type.rb', line 135 def value_class self.class.value_class end |