Module: HDLRuby::Vprocess
- Included in:
- High::Value
- Defined in:
- lib/HDLRuby/hruby_values.rb
Overview
To include to classes for value processing support.
Instance Method Summary collapse
-
#coerce(other) ⇒ Object
Coercion when operation from Ruby values.
-
#to_f ⇒ Object
Conversion to a float if possible.
-
#to_i ⇒ Object
Conversion to an integer if possible.
Instance Method Details
#coerce(other) ⇒ Object
Coercion when operation from Ruby values.
59 60 61 |
# File 'lib/HDLRuby/hruby_values.rb', line 59 def coerce(other) return other,self.content end |
#to_f ⇒ Object
Conversion to a float if possible.
54 55 56 |
# File 'lib/HDLRuby/hruby_values.rb', line 54 def to_f return self.content.to_f end |
#to_i ⇒ Object
Conversion to an integer if possible.
49 50 51 |
# File 'lib/HDLRuby/hruby_values.rb', line 49 def to_i return self.content.to_i end |