Module: Models::Scopes
- Defined in:
- lib/support/orm/rethinkdb/scopes.rb
Overview
Reopen to align with NoBrainer’s exclusively ‘super` overrides. ORM is thrust into an infinite loop, otherwise.
Instance Method Summary collapse
- #includes_scope?(*required_scopes) ⇒ Boolean
- #scopes ⇒ Object
- #scopes=(value) ⇒ Object
- #scopes_string ⇒ Object
Instance Method Details
#includes_scope?(*required_scopes) ⇒ Boolean
18 19 20 |
# File 'lib/support/orm/rethinkdb/scopes.rb', line 18 def includes_scope?(*required_scopes) required_scopes.blank? || required_scopes.any? { |scope| scopes.exists?(scope.to_s) } end |
#scopes ⇒ Object
6 7 8 |
# File 'lib/support/orm/rethinkdb/scopes.rb', line 6 def scopes OAuth::Scopes.from_string(super) end |
#scopes=(value) ⇒ Object
10 11 12 |
# File 'lib/support/orm/rethinkdb/scopes.rb', line 10 def scopes=(value) super Array(value).join(" ") end |
#scopes_string ⇒ Object
14 15 16 |
# File 'lib/support/orm/rethinkdb/scopes.rb', line 14 def scopes_string self._read_attribute(:scopes) end |