Class: Koz::Event
- Inherits:
-
Object
- Object
- Koz::Event
- Defined in:
- lib/koz/event.rb,
lib/koz/config.rb
Instance Attribute Summary collapse
-
#box ⇒ Object
Returns the value of attribute box.
-
#config ⇒ Object
Returns the value of attribute config.
-
#data ⇒ Object
Returns the value of attribute data.
-
#path ⇒ Object
Returns the value of attribute path.
-
#stopped ⇒ Object
Returns the value of attribute stopped.
-
#target ⇒ Object
Returns the value of attribute target.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #>>(photon) ⇒ Object
- #dup ⇒ Object
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #to_box ⇒ Object
Constructor Details
Instance Attribute Details
#box ⇒ Object
Returns the value of attribute box.
3 4 5 |
# File 'lib/koz/event.rb', line 3 def box @box end |
#config ⇒ Object
Returns the value of attribute config.
107 108 109 |
# File 'lib/koz/config.rb', line 107 def config @config end |
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/koz/event.rb', line 3 def data @data end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/koz/event.rb', line 3 def path @path end |
#stopped ⇒ Object
Returns the value of attribute stopped.
3 4 5 |
# File 'lib/koz/event.rb', line 3 def stopped @stopped end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/koz/event.rb', line 3 def target @target end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/koz/event.rb', line 3 def type @type end |
Instance Method Details
#>>(photon) ⇒ Object
20 21 22 |
# File 'lib/koz/event.rb', line 20 def >> photon photon.call self end |
#dup ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/koz/event.rb', line 12 def dup ev = self.class.new ev.target = @target ev.data = @data.dup ev.type = @type.dup ev end |
#to_box ⇒ Object
24 25 26 |
# File 'lib/koz/event.rb', line 24 def to_box @box.new(self) end |