Module: Vault::Scoping
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/vault/scoping.rb
Defined Under Namespace
Classes: Scope
Instance Method Summary collapse
Instance Method Details
#scope(name, &conditions) ⇒ Object
9 10 11 12 13 |
# File 'lib/vault/scoping.rb', line 9 def scope(name, &conditions) name = name.to_s scopes[name] = Scope.new(self, conditions.call) define_scope_method(name) end |
#scopes ⇒ Object
5 6 7 |
# File 'lib/vault/scoping.rb', line 5 def scopes @_scopes ||= Hash.new end |