lib/demiurge/action_item.rb
def notification(data)
      type = data.delete("type") || data.delete(:type) || data.delete("type") || data.delete(:type)
      zone = to_demiurge_name(data.delete("zone") || data.delete(:zone) || @item.zone)
      location = to_demiurge_name(data.delete("location") || data.delete(:location) || @item.location)
      actor = to_demiurge_name(data.delete("actor") || data.delete(:actor) || @item)
      @item.engine.send_notification(data, type: type.to_s, zone: zone, location: location, actor: actor, include_context: true)
      nil
    end
# Send a notification, starting from the location of the
# ActionItem. Any fields other than the special "type", "zone",
# "location" and "actor" fields will be sent as additional
# notification fields.
#
# @param data [Hash] The fields for the notification to send
# @option data [String] type The notification type to send
# @option data [String] zone The zone name to send the notification in; defaults to ActionItem's zone
# @option data [String] location The location name to send the notification in; defaults to ActionItem's location
# @option data [String] actor The acting item's name; defaults to this ActionItem
# @return [void]
# @since 0.0.1
Send a notification, starting from the location of the
ActionItem.
Send a notification starting from the location of the ActionItem .
def notification(data)
      type = data.delete("type") || data.delete(:type) || data.delete("type") || data.delete(:type)
      zone = to_demiurge_name(data.delete("zone") || data.delete(:zone) || @item.zone)
      location = to_demiurge_name(data.delete("location") || data.delete(:location) || @item.location)
      actor = to_demiurge_name(data.delete("actor") || data.delete(:actor) || @item)
      @item.engine.send_notification(data, type: type.to_s, zone: zone, location: location, actor: actor, include_context: true)
      nil
    end
def notification ( data ) type = data . delete ( "type" ) || data . delete ( :type ) || data . delete ( "type" ) || data . delete ( :type ) zone = to_demiurge_name ( data . delete ( "zone" ) || data . delete ( :zone ) || @item . zone ) location = to_demiurge_name ( data . delete ( "location" ) || data . delete ( :location ) || @item . location ) actor = to_demiurge_name ( data . delete ( "actor" ) || data . delete ( :actor ) || @item ) @item . engine . send_notification ( data , type : type . to_s , zone : zone , location : location , actor : actor , include_context : true ) nil end
Send a notification, starting from the location of the
ActionItem.
Send a notification starting from the location of the ActionItem .
None
void
data
actor The acting item's name; defaults to this ActionItem
actor The acting item ' s name ; defaults to this ActionItem
this ActionItem
since
None