Class: MilkTea::Types::LiteralTypeArg
- Inherits:
-
Object
- Object
- MilkTea::Types::LiteralTypeArg
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
-
#initialize(value) ⇒ LiteralTypeArg
constructor
A new instance of LiteralTypeArg.
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ LiteralTypeArg
Returns a new instance of LiteralTypeArg.
417 418 419 420 421 |
# File 'lib/milk_tea/core/types/types.rb', line 417 def initialize(value) @value = value @hash = [self.class, value].hash freeze end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
429 430 431 |
# File 'lib/milk_tea/core/types/types.rb', line 429 def hash @hash end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
415 416 417 |
# File 'lib/milk_tea/core/types/types.rb', line 415 def value @value end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
423 424 425 |
# File 'lib/milk_tea/core/types/types.rb', line 423 def eql?(other) other.is_a?(LiteralTypeArg) && other.value == value end |
#to_s ⇒ Object
431 432 433 |
# File 'lib/milk_tea/core/types/types.rb', line 431 def to_s value.to_s end |