Module: Canned::Context::Matchers::Plus
- Included in:
- Canned::Context::Multi
- Defined in:
- lib/canned/context/matchers/plus.rb
Instance Method Summary collapse
-
#plus(_name, _options = {}) ⇒ Object
Very similar to Load.load, but does not accepts a block and returns multi context that only allows to execute where operations.
Instance Method Details
#plus(_name, _options = {}) ⇒ Object
Very similar to Load.load, but does not accepts a block and returns multi context that only allows to execute where operations
8 9 10 11 12 13 14 |
# File 'lib/canned/context/matchers/plus.rb', line 8 def plus(_name, ={}) _chain_context(Canned::Context::Multi, nil) do |stack| resource = @ctx.resources[_resource] return false if resource.nil? @stack.push(:resource, .fetch(:as, _name), resource) end end |