Class: ParamsReady::Helpers::Callable
- Inherits:
-
Object
- Object
- ParamsReady::Helpers::Callable
- Defined in:
- lib/params_ready/helpers/callable.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(&block) ⇒ Callable
constructor
A new instance of Callable.
Constructor Details
#initialize(&block) ⇒ Callable
Returns a new instance of Callable.
4 5 6 7 |
# File 'lib/params_ready/helpers/callable.rb', line 4 def initialize(&block) @block = block freeze end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'lib/params_ready/helpers/callable.rb', line 9 def call @block.call end |