lib/dynamoid/adapter_plugin/aws_sdk_v2.rb
def build_attribute_definitions(hash_key_schema, range_key_schema = nil)
        attrs = []

        attrs << attribute_definition_element(
          hash_key_schema.keys.first,
          hash_key_schema.values.first
        )

        if range_key_schema.present?
          attrs << attribute_definition_element(
            range_key_schema.keys.first,
            range_key_schema.values.first
          )
        end

        attrs
      end
# Builds an attribute definitions based on hash key and range key
# @params [Hash] hash_key_schema - eg: {:id => :string}
# @params [Hash] range_key_schema - eg: {:created_at => :datetime}
# @return [Array]
Builds an attribute definitions based on hash key and range key
Builds an attribute definitions based on hash key and range key
def build_attribute_definitions(hash_key_schema, range_key_schema = nil)
        attrs = []
        attrs << attribute_definition_element(
          hash_key_schema.keys.first,
          hash_key_schema.values.first
        )
        if range_key_schema.present?
          attrs << attribute_definition_element(
            range_key_schema.keys.first,
            range_key_schema.values.first
          )
        end
        attrs
      end
def build_attribute_definitions ( hash_key_schema , range_key_schema = nil ) attrs = [ ] attrs << attribute_definition_element ( hash_key_schema . keys . first , hash_key_schema . values . first ) if range_key_schema . present? attrs << attribute_definition_element ( range_key_schema . keys . first , range_key_schema . values . first ) end attrs end
Builds an attribute definitions based on hash key and range key
Builds an attribute definitions based on hash key and range key
None
Array
hash_key_schema
range_key_schema
params
[Hash] hash_key_schema - eg: {:id => :string}
[ Hash ] hash_key_schema - eg : { : id = > : string }
params
[Hash] range_key_schema - eg: {:created_at => :datetime}
[ Hash ] range_key_schema - eg : { : created_at = > : datetime }