Class: Bushido::Event
- Inherits:
-
Object
- Object
- Bushido::Event
- Defined in:
- lib/bushido/event.rb
Overview
Bushido::Event lists all the events from the Bushido server. All events are hashes with the following keys:
-
category
-
name
-
data
Data will hold the arbitrary data for the type of event signalled
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
-
.all ⇒ Object
Lists all events.
-
.first ⇒ Object
Lists the first (oldest) event.
-
.last ⇒ Object
Lists the last (newest) event.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(options = {}) ⇒ Event
Returns a new instance of Event.
34 35 36 37 38 |
# File 'lib/bushido/event.rb', line 34 def initialize(={}) @category = ["category"] @name = ["name"] @data = ["data"] end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
15 16 17 |
# File 'lib/bushido/event.rb', line 15 def category @category end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
15 16 17 |
# File 'lib/bushido/event.rb', line 15 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/bushido/event.rb', line 15 def name @name end |