Class: InventoryRefresh::InventoryCollection::Index::Type::Data

Inherits:
Base
  • Object
show all
Defined in:
lib/inventory_refresh/inventory_collection/index/type/data.rb

Instance Method Summary collapse

Methods inherited from Base

#index_data, #initialize, #reindex!, #store_index_for

Constructor Details

This class inherits a constructor from InventoryRefresh::InventoryCollection::Index::Type::Base

Instance Method Details

#delete(index_value) ⇒ InventoryObject|nil

Deletes and returns the value on the index_value

Parameters:

  • index_value (String)

    a index_value of the InventoryObject we search for

Returns:



19
20
21
# File 'lib/inventory_refresh/inventory_collection/index/type/data.rb', line 19

def delete(index_value)
  index.delete(index_value)
end

#find(index_value) ⇒ Object

Find value based on index_value

Parameters:

  • index_value (String)

    a index_value of the InventoryObject we search in data



11
12
13
# File 'lib/inventory_refresh/inventory_collection/index/type/data.rb', line 11

def find(index_value)
  index[index_value]
end