module Spyke::Scoping::ClassMethods

Public Instance Methods

all() click to toggle source
# File lib/spyke/scoping.rb, line 12
def all
  current_scope || Relation.new(self, uri: uri)
end
current_scope() click to toggle source
# File lib/spyke/scoping.rb, line 24
def current_scope
  ScopeRegistry.value_for(:current_scope, name)
end
current_scope=(scope) click to toggle source
# File lib/spyke/scoping.rb, line 20
def current_scope=(scope)
  ScopeRegistry.set_value_for(:current_scope, name, scope)
end
scope(name, code) click to toggle source
# File lib/spyke/scoping.rb, line 16
def scope(name, code)
  define_singleton_method name, code
end