Module: OpenHAB::Core::Types::NumericType
- Included in:
- DecimalType, QuantityType
- Defined in:
- lib/openhab/core/types/numeric_type.rb
Overview
Mixin for methods common to DecimalType and QuantityType.
Instance Method Summary collapse
- #+@ ⇒ self
-
#eql?(other) ⇒ true, false
Check equality without type conversion.
- #to_d ⇒ BigDecimal
- #to_f ⇒ Float
- #to_i ⇒ Integer
Instance Method Details
#+@ ⇒ self
37 38 39 |
# File 'lib/openhab/core/types/numeric_type.rb', line 37 def +@ self end |
#eql?(other) ⇒ true, false
Check equality without type conversion
30 31 32 33 34 |
# File 'lib/openhab/core/types/numeric_type.rb', line 30 def eql?(other) return false unless other.instance_of?(self.class) compare_to(other).zero? end |
#to_d ⇒ BigDecimal
|
# File 'lib/openhab/core/types/numeric_type.rb', line 41
|