Class: INatGet::Data::DSL::Condition::Query
- Inherits:
-
INatGet::Data::DSL::Condition
- Object
- INatGet::Data::DSL::Condition
- INatGet::Data::DSL::Condition::Query
- Defined in:
- lib/inat-get/data/dsl/conditions/query.rb
Metadata collapse
- #helper ⇒ INatGet::Data::Helper readonly private
- #model ⇒ class of Sequel::Model readonly private
- #query ⇒ Hash readonly private
Attributes inherited from INatGet::Data::DSL::Condition
Operators collapse
Constructor collapse
Methods inherited from INatGet::Data::DSL::Condition
#!, #&, #api_query, #sequel_query, #|
Methods included from INatGet::Data::DSL
#AND, #ANYTHING, #NOT, #NOTHING, #OR, #Q, #finish_time, #get_identification, #get_observation, #get_place, #get_project, #get_taxon, #get_user, #now, #select_identifications, #select_observations, #select_places, #select_projects, #select_taxa, #select_users, #start_time, #time_range, #today, #version, #version!, #version?, #version_alias
Instance Attribute Details
#helper ⇒ INatGet::Data::Helper (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/inat-get/data/dsl/conditions/query.rb', line 20 def helper @helper end |
#model ⇒ class of Sequel::Model (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/inat-get/data/dsl/conditions/query.rb', line 16 def model @model end |
#query ⇒ Hash (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/inat-get/data/dsl/conditions/query.rb', line 12 def query @query end |
Class Method Details
.[](model, validate: true, **query) ⇒ Condition
54 55 56 57 |
# File 'lib/inat-get/data/dsl/conditions/query.rb', line 54 def [] model, validate: true, **query return creator(model) if query.empty? new(model, validate: validate, **query).freeze end |
Instance Method Details
#==(other) ⇒ Boolean
35 36 37 38 39 |
# File 'lib/inat-get/data/dsl/conditions/query.rb', line 35 def == other return true if self.equal?(other) return false unless other.is_a?(Query) self.query == other.query && self.helper == other.helper end |