Class: Dhallish::Types::Optional
- Inherits:
-
Object
- Object
- Dhallish::Types::Optional
- Defined in:
- lib/types.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Type of Optional.
Instance Method Summary collapse
- #==(otype) ⇒ Object
-
#initialize(type) ⇒ Optional
constructor
A new instance of Optional.
- #to_s ⇒ Object
Constructor Details
#initialize(type) ⇒ Optional
Returns a new instance of Optional.
36 37 38 |
# File 'lib/types.rb', line 36 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object
Type of Optional
35 36 37 |
# File 'lib/types.rb', line 35 def type @type end |
Instance Method Details
#==(otype) ⇒ Object
40 |
# File 'lib/types.rb', line 40 def ==(otype) otype.is_a? Optional and otype.type == @type end |
#to_s ⇒ Object
41 |
# File 'lib/types.rb', line 41 def to_s() "Optional #{@type.to_s}" end |