Class: Prelude::Method
- Inherits:
-
Object
- Object
- Prelude::Method
- Defined in:
- lib/prelude/method.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
readonly
Returns the value of attribute batch_size.
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(batch_size:, &blk) ⇒ Method
constructor
A new instance of Method.
Constructor Details
#initialize(batch_size:, &blk) ⇒ Method
Returns a new instance of Method.
5 6 7 8 |
# File 'lib/prelude/method.rb', line 5 def initialize(batch_size:, &blk) @batch_size = batch_size @definition = blk end |
Instance Attribute Details
#batch_size ⇒ Object (readonly)
Returns the value of attribute batch_size.
3 4 5 |
# File 'lib/prelude/method.rb', line 3 def batch_size @batch_size end |
Instance Method Details
#call(*args) ⇒ Object
10 11 12 |
# File 'lib/prelude/method.rb', line 10 def call(*args) @definition.call(*args) end |