Class: Canned::Context::Matchers::Where::WhereCtx
- Inherits:
-
Object
- Object
- Canned::Context::Matchers::Where::WhereCtx
- Defined in:
- lib/canned/context/matchers/where.rb
Instance Method Summary collapse
-
#initialize(_stack) ⇒ WhereCtx
constructor
A new instance of WhereCtx.
- #method_missing(_method, *_args, &_block) ⇒ Object
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 |