Class: INatGet::Data::DSL::Condition
- Inherits:
-
Object
- Object
- INatGet::Data::DSL::Condition
- Includes:
- INatGet::Data::DSL
- Defined in:
- lib/inat-get/data/dsl/conditions/base.rb
Defined Under Namespace
Modules: Special Classes: AND, Anything, NOT, Nothing, OR, Query
Metadata collapse
- #manager ⇒ INatGet::Data::Manager readonly private
- #model ⇒ class of Sequel::Model readonly private
Operators collapse
Instance Method Summary collapse
- #api_query ⇒ Array<Hash> private
- #sequel_query ⇒ Sequel::SQL::Expression private
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
#manager ⇒ INatGet::Data::Manager (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 |
# File 'lib/inat-get/data/dsl/conditions/base.rb', line 20 def manager = self.model.manager |
#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.
25 |
# File 'lib/inat-get/data/dsl/conditions/base.rb', line 25 def model = raise NotImplementedError, "Not implemented method 'model' for abstract class.", caller_locations |
Instance Method Details
#! ⇒ Condition
46 47 48 |
# File 'lib/inat-get/data/dsl/conditions/base.rb', line 46 def ! NOT[ self ] end |
#&(other) ⇒ Condition
32 33 34 35 36 |
# File 'lib/inat-get/data/dsl/conditions/base.rb', line 32 def & other return self if other == ANYTHING return NOTHING if other == NOTHING AND[ self, other ] end |
#api_query ⇒ Array<Hash>
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.
106 107 108 |
# File 'lib/inat-get/data/dsl/conditions/base.rb', line 106 def api_query normalize.simplify.send :to_api end |
#sequel_query ⇒ Sequel::SQL::Expression
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.
112 113 114 |
# File 'lib/inat-get/data/dsl/conditions/base.rb', line 112 def sequel_query normalize.send :to_sequel end |