Class: Literal::Types::UnitType Private
- Inherits:
-
Object
- Object
- Literal::Types::UnitType
- Includes:
- Literal::Type
- Defined in:
- lib/literal/types/unit_type.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- EQUAL_METHOD =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
BasicObject.instance_method(:equal?)
Instance Attribute Summary collapse
- #object ⇒ Object readonly private
Instance Method Summary collapse
- #===(value) ⇒ Object private
- #>=(other) ⇒ Object private
-
#initialize(object) ⇒ UnitType
constructor
private
A new instance of UnitType.
Constructor Details
#initialize(object) ⇒ UnitType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of UnitType.
9 10 11 12 |
# File 'lib/literal/types/unit_type.rb', line 9 def initialize(object) @object = object freeze end |
Instance Attribute Details
#object ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/literal/types/unit_type.rb', line 14 def object @object end |
Instance Method Details
#===(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/literal/types/unit_type.rb', line 16 def ===(value) EQUAL_METHOD.bind_call(@object, value) end |
#>=(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 27 |
# File 'lib/literal/types/unit_type.rb', line 20 def >=(other) case other when Literal::Types::UnitType EQUAL_METHOD.bind_call(@object, other.object) else false end end |