Class: ParamsReady::Helpers::Callable

Inherits:
Object
  • Object
show all
Defined in:
lib/params_ready/helpers/callable.rb

Instance Method Summary collapse

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

#callObject



9
10
11
# File 'lib/params_ready/helpers/callable.rb', line 9

def call
  @block.call
end