Class: Lasp::Params
- Inherits:
-
Object
- Object
- Lasp::Params
- Defined in:
- lib/lasp/params.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#param_list ⇒ Object
readonly
Returns the value of attribute param_list.
Instance Method Summary collapse
-
#initialize(param_list) ⇒ Params
constructor
A new instance of Params.
- #to_s ⇒ Object
- #with_args(args) ⇒ Object
Constructor Details
#initialize(param_list) ⇒ Params
Returns a new instance of Params.
7 8 9 |
# File 'lib/lasp/params.rb', line 7 def initialize(param_list) @param_list = param_list end |
Instance Attribute Details
#param_list ⇒ Object (readonly)
Returns the value of attribute param_list.
5 6 7 |
# File 'lib/lasp/params.rb', line 5 def param_list @param_list end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/lasp/params.rb', line 11 def to_s "(" + param_list.join(" ") + ")" end |
#with_args(args) ⇒ Object
15 16 17 18 |
# File 'lib/lasp/params.rb', line 15 def with_args(args) enforce_arity!(args) fixed_params.zip(args.take(length)).to_h end |