Sha256: 2adb04cd7c26175fbd93c48beb7293dad09db083801ad8a4229b309b402cc211
Contents?: true
Size: 518 Bytes
Versions: 10
Compression:
Stored size: 518 Bytes
Contents
module CloudSesame module Query module DSL module ScopeAccessors def scopes(name = nil, *args) return _return if name.nil? defined_scopes = _scope.context[:scopes] if defined_scopes && (block = defined_scopes[name.to_sym]) instance_exec *args, &block _return else raise Error::ScopeNotDefined end end private def method_missing(name, *args, &block) scopes name, *args rescue Error::ScopeNotDefined super end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems