Class: Dhallish::Types::Optional

Inherits:
Object
  • Object
show all
Defined in:
lib/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject

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_sObject



41
# File 'lib/types.rb', line 41

def to_s() "Optional #{@type.to_s}" end