Module: PDC::Resource::Scopes::ClassMethods
- Defined in:
- lib/pdc/resource/scopes.rb
Instance Method Summary collapse
- #current_scope ⇒ Object
- #current_scope=(value) ⇒ Object
- #scope(name, code) ⇒ Object
- #scoped ⇒ Object
Instance Method Details
#current_scope ⇒ Object
20 21 22 |
# File 'lib/pdc/resource/scopes.rb', line 20 def current_scope ScopeRegistry.value_for(:current_scope, name) end |
#current_scope=(value) ⇒ Object
16 17 18 |
# File 'lib/pdc/resource/scopes.rb', line 16 def current_scope=(value) ScopeRegistry.set_value_for(:current_scope, name, value) end |
#scope(name, code) ⇒ Object
12 13 14 |
# File 'lib/pdc/resource/scopes.rb', line 12 def scope(name, code) define_singleton_method name, code end |