Class: Risc::Action
- Inherits:
-
Object
- Object
- Risc::Action
- Defined in:
- lib/risc/Sim.rb
Overview
Internal Sim class used to describe an action for a Process.
Instance Attribute Summary collapse
-
#event ⇒ Object
Returns the value of attribute event.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #assign(action) ⇒ Object
-
#initialize(type, pid, event = nil) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(type, pid, event = nil) ⇒ Action
Returns a new instance of Action.
50 51 52 53 54 |
# File 'lib/risc/Sim.rb', line 50 def initialize(type,pid,event = nil) @type = type @pid = pid @event = event end |
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event.
48 49 50 |
# File 'lib/risc/Sim.rb', line 48 def event @event end |
#pid ⇒ Object
Returns the value of attribute pid.
48 49 50 |
# File 'lib/risc/Sim.rb', line 48 def pid @pid end |
#type ⇒ Object
Returns the value of attribute type.
48 49 50 |
# File 'lib/risc/Sim.rb', line 48 def type @type end |
Instance Method Details
#assign(action) ⇒ Object
56 57 58 59 60 |
# File 'lib/risc/Sim.rb', line 56 def assign(action) @type = action.type; @pid = action.pid; @event = action.event; end |