Class: Inform::Event

Inherits:
Object show all
Includes:
EventInitializationMethods, Publisher, PrivateEventMethods, PublicEventMethods
Defined in:
lib/runtime/events.rb,
lib/runtime/world_tree.rb

Overview

The Inform::Event class

Constant Summary

Constants included from Subscribers

Subscribers::REGISTRY

Constants included from EventConstants

EventConstants::CallerPattern, EventConstants::EventActivityTemplate, EventConstants::EventAntecedantTemplate, EventConstants::EventCauseIdentityTemplate, EventConstants::EventNameTemplate, EventConstants::EventSourceFullTemplate, EventConstants::EventSourceTemplate

Constants included from PublicEventMethods

PublicEventMethods::RecordNotFoundErrorPattern

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Publisher

#muted?, #publish, #publish_except, #publish_only, #publish_system_message, #subscribers

Methods included from Subscribers

#explicit_subscribers, #subscribe, #subscribers, #unsubscribe, #unsubscribe_all

Methods included from EventInitializationMethods

#defer, #generate_identity, #init_context, #init_fields, #schedule_or_defer

Methods included from PublicEventMethods

#<<, #antecedent_cancelled?, #call, #call_activity, #cancelled?, #concluded?, #contextualize, #delay, #elemental?, #finally, #get, #immediately?, #inspect, #integral?, #java_get, #mandate_cause_record_exists!, #maybe_log_nilling_warning, #now, #on_cancelled_antecedent, #on_failure, #on_success, #origin, #parse_activity, #run, #termination, #to_s, #warn_when_nilling_noun

Constructor Details

#initialize(params = {}, &block) ⇒ Event



532
533
534
535
536
537
# File 'lib/runtime/events.rb', line 532

def initialize(params = {}, &block)
  @semaphore = Mutex.new
  init_fields(params, &block)
  init_context(@context, @antecedent, @cause)
  invoke(self)
end

Instance Attribute Details

#activityObject (readonly)

Returns the value of attribute activity.



528
529
530
# File 'lib/runtime/events.rb', line 528

def activity
  @activity
end

#antecedentObject

Returns the value of attribute antecedent.



530
531
532
# File 'lib/runtime/events.rb', line 530

def antecedent
  @antecedent
end

#argsObject (readonly)

Returns the value of attribute args.



528
529
530
# File 'lib/runtime/events.rb', line 528

def args
  @args
end

#callstackObject

Returns the value of attribute callstack.



530
531
532
# File 'lib/runtime/events.rb', line 530

def callstack
  @callstack
end

#causeObject (readonly)

Returns the value of attribute cause.



528
529
530
# File 'lib/runtime/events.rb', line 528

def cause
  @cause
end

#concludedObject

Returns the value of attribute concluded.



530
531
532
# File 'lib/runtime/events.rb', line 530

def concluded
  @concluded
end

#contextObject (readonly)

Returns the value of attribute context.



528
529
530
# File 'lib/runtime/events.rb', line 528

def context
  @context
end

#futureObject

Returns the value of attribute future.



530
531
532
# File 'lib/runtime/events.rb', line 530

def future
  @future
end

#identityObject (readonly)

Returns the value of attribute identity.



528
529
530
# File 'lib/runtime/events.rb', line 528

def identity
  @identity
end

#nameObject (readonly)

Returns the value of attribute name.



528
529
530
# File 'lib/runtime/events.rb', line 528

def name
  @name
end

#semaphoreObject (readonly)

Returns the value of attribute semaphore.



528
529
530
# File 'lib/runtime/events.rb', line 528

def semaphore
  @semaphore
end

#successorsObject

Returns the value of attribute successors.



530
531
532
# File 'lib/runtime/events.rb', line 530

def successors
  @successors
end

#terminusObject (readonly)

Returns the value of attribute terminus.



528
529
530
# File 'lib/runtime/events.rb', line 528

def terminus
  @terminus
end

#timeObject (readonly)

Returns the value of attribute time.



528
529
530
# File 'lib/runtime/events.rb', line 528

def time
  @time
end

#time_delayObject (readonly)

Returns the value of attribute time_delay.



528
529
530
# File 'lib/runtime/events.rb', line 528

def time_delay
  @time_delay
end

#typeObject (readonly)

Returns the value of attribute type.



528
529
530
# File 'lib/runtime/events.rb', line 528

def type
  @type
end