class RLTK::CG::NumberType
All types that are used to represent numbers inherit from this class.
@abstract
Public Class Methods
value_class()
click to toggle source
@return [Value] The corresponding Value
sub-class that is used to represent values of this type.
# 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
Public Instance Methods
value_class()
click to toggle source
@return [Value] The corresponding Value
sub-class that is used to represent values of this type.
# File lib/rltk/cg/type.rb, line 135 def value_class self.class.value_class end