Module: TinyDyno::HashKeys
- Extended by:
- ActiveSupport::Concern
- Included in:
- DocumentComposition
- Defined in:
- lib/tiny_dyno/hash_keys.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#hash_key_as_selector ⇒ Object
return all defined hash keys on an instantiated object for further use in DynamoDB queries.
Instance Method Details
#hash_key_as_selector ⇒ Object
return all defined hash keys on an instantiated object for further use in DynamoDB queries
19 20 21 22 23 |
# File 'lib/tiny_dyno/hash_keys.rb', line 19 def hash_key_as_selector selector = {} self.class.hash_keys.each { |hk| selector[hk[:attr]] = attributes[hk[:attr]] } selector end |