Class: Pakyow::Application::Behavior::Operations::Lookup
- Inherits:
-
Object
- Object
- Pakyow::Application::Behavior::Operations::Lookup
- Defined in:
- lib/pakyow/application/behavior/operations.rb
Instance Method Summary collapse
-
#initialize(operations:, app:) ⇒ Lookup
constructor
A new instance of Lookup.
Constructor Details
#initialize(operations:, app:) ⇒ Lookup
Returns a new instance of Lookup.
14 15 16 17 18 19 20 |
# File 'lib/pakyow/application/behavior/operations.rb', line 14 def initialize(operations:, app:) operations.each do |operation| define_singleton_method operation.__object_name.name do |values = {}, &block| (block ? Class.new(operation, &block) : operation).new(app: app, **values).perform end end end |