Module: NudgeType::TypeBehaviors
- Included in:
- BoolType, CodeType, FloatType, IntType, ProportionType
- Defined in:
- lib/interpreter/types/pushTypes.rb
Class Method Summary collapse
Instance Method Summary collapse
- #any_value ⇒ Object
- #from_s(some_string) ⇒ Object
- #random_value(params) ⇒ Object
- #recognizes?(some_representation) ⇒ Boolean
- #to_nudgecode ⇒ Object
Class Method Details
Instance Method Details
#any_value ⇒ Object
30 31 32 |
# File 'lib/interpreter/types/pushTypes.rb', line 30 def any_value raise "This class must implement #{self.inspect}.any_value" end |
#from_s(some_string) ⇒ Object
22 23 24 |
# File 'lib/interpreter/types/pushTypes.rb', line 22 def from_s(some_string) raise "This class must implement #{self.inspect}.from_s" end |
#random_value(params) ⇒ Object
34 35 36 |
# File 'lib/interpreter/types/pushTypes.rb', line 34 def random_value(params) raise "This class must implement #{self.inspect}.random_value" end |
#recognizes?(some_representation) ⇒ Boolean
26 27 28 |
# File 'lib/interpreter/types/pushTypes.rb', line 26 def recognizes?(some_representation) raise "This class should implement #{self.inspect}.recognizes?" end |
#to_nudgecode ⇒ Object
18 19 20 |
# File 'lib/interpreter/types/pushTypes.rb', line 18 def to_nudgecode self.to_s.demodulize.slice(0..-5).downcase.intern end |