Class: Dynamoid::Criteria::KeyFieldsDetector
- Inherits:
-
Object
- Object
- Dynamoid::Criteria::KeyFieldsDetector
- Defined in:
- lib/dynamoid/criteria/key_fields_detector.rb
Instance Attribute Summary collapse
-
#hash_key ⇒ Object
readonly
Returns the value of attribute hash_key.
-
#index_name ⇒ Object
readonly
Returns the value of attribute index_name.
-
#range_key ⇒ Object
readonly
Returns the value of attribute range_key.
Instance Method Summary collapse
-
#initialize(query, source) ⇒ KeyFieldsDetector
constructor
A new instance of KeyFieldsDetector.
- #key_present? ⇒ Boolean
Constructor Details
#initialize(query, source) ⇒ KeyFieldsDetector
Returns a new instance of KeyFieldsDetector.
8 9 10 11 12 13 |
# File 'lib/dynamoid/criteria/key_fields_detector.rb', line 8 def initialize(query, source) @query = query @source = source detect_keys end |
Instance Attribute Details
#hash_key ⇒ Object (readonly)
Returns the value of attribute hash_key.
6 7 8 |
# File 'lib/dynamoid/criteria/key_fields_detector.rb', line 6 def hash_key @hash_key end |
#index_name ⇒ Object (readonly)
Returns the value of attribute index_name.
6 7 8 |
# File 'lib/dynamoid/criteria/key_fields_detector.rb', line 6 def index_name @index_name end |
#range_key ⇒ Object (readonly)
Returns the value of attribute range_key.
6 7 8 |
# File 'lib/dynamoid/criteria/key_fields_detector.rb', line 6 def range_key @range_key end |
Instance Method Details
#key_present? ⇒ Boolean
15 16 17 |
# File 'lib/dynamoid/criteria/key_fields_detector.rb', line 15 def key_present? @hash_key.present? end |