Class: Apia::LookupEnvironment

Inherits:
Object
  • Object
show all
Includes:
EnvironmentErrorHandling
Defined in:
lib/apia/lookup_environment.rb

Instance Method Summary collapse

Methods included from EnvironmentErrorHandling

#error_for_exception, #raise_error, #raise_exception

Constructor Details

#initialize(set) ⇒ LookupEnvironment

Returns a new instance of LookupEnvironment.



10
11
12
# File 'lib/apia/lookup_environment.rb', line 10

def initialize(set)
  @set = set
end

Instance Method Details

#call(request, *args, &block) ⇒ Object



14
15
16
17
18
# File 'lib/apia/lookup_environment.rb', line 14

def call(request, *args, &block)
  return unless block_given?

  instance_exec(@set, request, *args, &block)
end