Class: BindableBlock::ArgAligner
- Inherits:
-
Object
- Object
- BindableBlock::ArgAligner
- Defined in:
- lib/bindable_block/arg_aligner.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args, instance_method) ⇒ ArgAligner
constructor
A new instance of ArgAligner.
Constructor Details
#initialize(args, instance_method) ⇒ ArgAligner
Returns a new instance of ArgAligner.
3 4 5 6 7 8 |
# File 'lib/bindable_block/arg_aligner.rb', line 3 def initialize(args, instance_method) @result, @args, @parameters = [], args, instance_method.parameters.map(&:first) take num :req take [num(:opt), args.size].min take args.size if has? :rest end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/bindable_block/arg_aligner.rb', line 10 def call result end |