Module: KeteTrackableItems::TrackableItem::InstanceMethods

Defined in:
lib/kete_trackable_items/trackable_item.rb

Instance Method Summary collapse

Instance Method Details

#description_for_tracked_itemObject



66
67
68
# File 'lib/kete_trackable_items/trackable_item.rb', line 66

def description_for_tracked_item
  send(self.class.described_as_in_tracking_list)
end

#has_shelf_locations?Boolean

could be called is_allocated_to_shelf ?

Returns:

  • (Boolean)


62
63
64
# File 'lib/kete_trackable_items/trackable_item.rb', line 62

def has_shelf_locations?
  shelf_locations.size > 0
end

#mapping_deactivated_or_destroyedObject



75
76
77
# File 'lib/kete_trackable_items/trackable_item.rb', line 75

def mapping_deactivated_or_destroyed
  unassign_location! if on_shelf? && !has_shelf_locations?
end

#new_allocationObject

add workflow triggered methods that run when corresponding event is triggered as necessary



71
72
73
# File 'lib/kete_trackable_items/trackable_item.rb', line 71

def new_allocation
  allocate!
end