Class: Devlin::Base
- Inherits:
-
Object
- Object
- Devlin::Base
- Defined in:
- lib/devlin/base.rb
Class Method Summary collapse
- .[](name) ⇒ Object
-
.scopes ⇒ Object
returns the keys of the defined scopes.
Instance Method Summary collapse
-
#initialize(params) ⇒ Base
constructor
A new instance of Base.
- #query(q) ⇒ Object
- #scope(name) ⇒ Object
Constructor Details
#initialize(params) ⇒ Base
Returns a new instance of Base.
3 4 5 |
# File 'lib/devlin/base.rb', line 3 def initialize(params) @params = params end |
Class Method Details
.[](name) ⇒ Object
12 13 14 |
# File 'lib/devlin/base.rb', line 12 def self.[](name) @scopes[name.to_sym] end |
.scopes ⇒ Object
returns the keys of the defined scopes
8 9 10 |
# File 'lib/devlin/base.rb', line 8 def self.scopes @scopes.keys end |