Class: Dhallish::Union
- Inherits:
-
Object
- Object
- Dhallish::Union
- Defined in:
- lib/types.rb
Instance Attribute Summary collapse
-
#init_label ⇒ Object
Returns the value of attribute init_label.
-
#init_val ⇒ Object
Returns the value of attribute init_val.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(init_label, init_val, type) ⇒ Union
constructor
A new instance of Union.
- #select(label) ⇒ Object
Constructor Details
#initialize(init_label, init_val, type) ⇒ Union
Returns a new instance of Union.
343 344 345 346 347 |
# File 'lib/types.rb', line 343 def initialize(init_label, init_val, type) @init_label = init_label @init_val = init_val @type = type end |
Instance Attribute Details
#init_label ⇒ Object
Returns the value of attribute init_label.
339 340 341 |
# File 'lib/types.rb', line 339 def init_label @init_label end |
#init_val ⇒ Object
Returns the value of attribute init_val.
340 341 342 |
# File 'lib/types.rb', line 340 def init_val @init_val end |
#type ⇒ Object
Returns the value of attribute type.
341 342 343 |
# File 'lib/types.rb', line 341 def type @type end |
Instance Method Details
#select(label) ⇒ Object
349 350 351 352 353 354 355 |
# File 'lib/types.rb', line 349 def select(label) if label == @init_label @init_val else nil end end |