Module: ActiveFedora::Scoping::ClassMethods

Defined in:
lib/active_fedora/scoping.rb

Instance Method Summary collapse

Instance Method Details

#current_scopeObject

:nodoc:



13
14
15
# File 'lib/active_fedora/scoping.rb', line 13

def current_scope # :nodoc:
  ScopeRegistry.value_for(:current_scope, self)
end

#current_scope=(scope) ⇒ Object

:nodoc:



17
18
19
# File 'lib/active_fedora/scoping.rb', line 17

def current_scope=(scope) # :nodoc:
  ScopeRegistry.set_value_for(:current_scope, self, scope)
end

#scope_attributesObject

Collects attributes from scopes that should be applied when creating an AF instance for the particular class this is called on.



23
24
25
# File 'lib/active_fedora/scoping.rb', line 23

def scope_attributes # :nodoc:
  all.scope_for_create
end

#scope_attributes?Boolean

Are there attributes associated with this scope?

Returns:

  • (Boolean)


28
29
30
# File 'lib/active_fedora/scoping.rb', line 28

def scope_attributes? # :nodoc:
  current_scope
end