Class: Canned::Context::Matchers::Where::WhereCtx

Inherits:
Object
  • Object
show all
Defined in:
lib/canned/context/matchers/where.rb

Instance Method Summary collapse

Constructor Details

#initialize(_stack) ⇒ WhereCtx

Returns a new instance of WhereCtx.



7
8
9
# File 'lib/canned/context/matchers/where.rb', line 7

def initialize(_stack)
  @stack = _stack
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(_method, *_args, &_block) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/canned/context/matchers/where.rb', line 11

def method_missing(_method, *_args, &_block)
  if _args.count == 0 and _block.nil?
    begin
      return @stack.resolve(_method)
    rescue Canned::InmmutableStack::NotFound; end
  end
  super
end