Class: WinewooCore::Repositories::Mongo::Queries::WinewooQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/winewoo_core/repositories/mongo/queries/winewoo_query.rb

Instance Method Summary collapse

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

Returns:

  • (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

Returns:

  • (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