Class: Medic::AnchoredObjectQueryBuilder
- Inherits:
-
Object
- Object
- Medic::AnchoredObjectQueryBuilder
- Defined in:
- lib/medic/anchored_object_query_builder.rb
Constant Summary
Constants included from Anchor
Constants included from QueryOptions
Constants included from Types
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(args = {}, block = Proc.new) ⇒ AnchoredObjectQueryBuilder
constructor
A new instance of AnchoredObjectQueryBuilder.
Methods included from Anchor
Methods included from Predicate
Methods included from QueryOptions
Methods included from Types
#object_type, #type_identifier
Constructor Details
#initialize(args = {}, block = Proc.new) ⇒ AnchoredObjectQueryBuilder
Returns a new instance of AnchoredObjectQueryBuilder.
10 11 12 13 14 15 16 17 18 |
# File 'lib/medic/anchored_object_query_builder.rb', line 10 def initialize(args={}, block=Proc.new) @params = args @query = HKAnchoredObjectQuery.alloc.initWithType(object_type(args[:type]), predicate: predicate(args), anchor: anchor_for_symbol(args[:anchor_date] || args[:anchor] || args[:date] || HKAnchoredObjectQueryNoAnchor), limit: args[:limit] || HKObjectQueryNoLimit, completionHandler: block ) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/medic/anchored_object_query_builder.rb', line 3 def params @params end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
4 5 6 |
# File 'lib/medic/anchored_object_query_builder.rb', line 4 def query @query end |