Module: KeteTrackableItems::TrackableItem::InstanceMethods
- Defined in:
- lib/kete_trackable_items/trackable_item.rb
Instance Method Summary collapse
- #description_for_tracked_item ⇒ Object
-
#has_shelf_locations? ⇒ Boolean
could be called is_allocated_to_shelf ?.
- #mapping_deactivated_or_destroyed ⇒ Object
-
#new_allocation ⇒ Object
add workflow triggered methods that run when corresponding event is triggered as necessary.
Instance Method Details
#description_for_tracked_item ⇒ Object
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 ?
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_destroyed ⇒ Object
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_allocation ⇒ Object
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 |