Class: Brief::Data::Queryable
- Inherits:
-
Object
- Object
- Brief::Data::Queryable
- Defined in:
- lib/brief/data.rb
Instance Method Summary collapse
-
#initialize(array) ⇒ Queryable
constructor
A new instance of Queryable.
- #method_missing(meth, *args, &block) ⇒ Object
- #where(*args, &block) ⇒ Object
Constructor Details
#initialize(array) ⇒ Queryable
Returns a new instance of Queryable.
4 5 6 |
# File 'lib/brief/data.rb', line 4 def initialize(array) @array = Array(array) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
12 13 14 |
# File 'lib/brief/data.rb', line 12 def method_missing(meth, *args, &block) @array.send(meth,*args,&block) end |
Instance Method Details
#where(*args, &block) ⇒ Object
8 9 10 |
# File 'lib/brief/data.rb', line 8 def where(*args, &block) Brief::DocumentMapper::Query.new(@array).send(:where, *args) end |