Class: Dynomite::Item::Indexes::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/dynomite/item/indexes/index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Index

Returns a new instance of Index.



7
8
9
# File 'lib/dynomite/item/indexes/index.rb', line 7

def initialize(data)
  @data = data # from describe_table.table.global_secondary_indexes items
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/dynomite/item/indexes/index.rb', line 6

def data
  @data
end

Instance Method Details

#fieldsObject



11
12
13
14
15
# File 'lib/dynomite/item/indexes/index.rb', line 11

def fields
  key_schema.map do |hash|
    hash.attribute_name
  end.sort
end

#primary?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/dynomite/item/indexes/index.rb', line 17

def primary?
  false
end