Class: WinewooCore::Repositories::Mongo::Queries::WinewooQuery
- Inherits:
-
Object
- Object
- WinewooCore::Repositories::Mongo::Queries::WinewooQuery
- Defined in:
- lib/winewoo_core/repositories/mongo/queries/winewoo_query.rb
Direct Known Subclasses
PictoQuery, UserQuery, VintageQuery, WineQuery, WinewooUserLogQuery
Instance Method Summary collapse
-
#initialize(relation) ⇒ WinewooQuery
constructor
A new instance of WinewooQuery.
- #method_missing(method_name, *arguments, &block) ⇒ Object
- #respond_to?(method_name, include_private = false) ⇒ Boolean
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(relation) ⇒ WinewooQuery
Returns a new instance of WinewooQuery.
4 5 6 |
# File 'lib/winewoo_core/repositories/mongo/queries/winewoo_query.rb', line 4 def initialize(relation) @relation = relation end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *arguments, &block) ⇒ Object
8 9 10 |
# File 'lib/winewoo_core/repositories/mongo/queries/winewoo_query.rb', line 8 def method_missing(method_name, *arguments, &block) @relation && @relation.send(method_name, *arguments, &block) end |
Instance Method Details
#respond_to?(method_name, include_private = false) ⇒ Boolean
12 13 14 |
# File 'lib/winewoo_core/repositories/mongo/queries/winewoo_query.rb', line 12 def respond_to?(method_name, include_private = false) @relation && @relation.respond_to?(method_name, include_private) end |
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
16 17 18 |
# File 'lib/winewoo_core/repositories/mongo/queries/winewoo_query.rb', line 16 def respond_to_missing?(method_name, include_private = false) @relation && @relation.respond_to_missing?(method_name, include_private) end |