Class: DMatch::Var
- Includes:
- Predicated
- Defined in:
- lib/destructure/types.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = nil, &pred) ⇒ Var
constructor
A new instance of Var.
Methods included from Predicated
Constructor Details
#initialize(name = nil, &pred) ⇒ Var
Returns a new instance of Var.
21 22 23 24 |
# File 'lib/destructure/types.rb', line 21 def initialize(name=nil, &pred) @name = name self.pred = pred end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/destructure/types.rb', line 19 def name @name end |