Class: Dhallish::Types::List
- Inherits:
-
Object
- Object
- Dhallish::Types::List
- Defined in:
- lib/types.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Type of List elements.
Instance Method Summary collapse
- #==(otype) ⇒ Object
-
#initialize(type) ⇒ List
constructor
A new instance of List.
- #to_s ⇒ Object
Constructor Details
#initialize(type) ⇒ List
Returns a new instance of List.
46 47 48 |
# File 'lib/types.rb', line 46 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object
Type of List elements
45 46 47 |
# File 'lib/types.rb', line 45 def type @type end |
Instance Method Details
#==(otype) ⇒ Object
50 |
# File 'lib/types.rb', line 50 def ==(otype) otype.is_a? List and otype.type == @type end |
#to_s ⇒ Object
51 |
# File 'lib/types.rb', line 51 def to_s() "List #{@type.to_s}" end |