Class: AsteriskManager::Event
- Inherits:
-
Object
- Object
- AsteriskManager::Event
- Defined in:
- lib/asterisk-manager/event.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(attributes = {}) ⇒ Event
constructor
A new instance of Event.
- #type ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Event
Returns a new instance of Event.
5 6 7 |
# File 'lib/asterisk-manager/event.rb', line 5 def initialize(attributes = {}) self.attributes = attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/asterisk-manager/event.rb', line 3 def attributes @attributes end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/asterisk-manager/event.rb', line 13 def [](key) attributes[key] end |
#type ⇒ Object
9 10 11 |
# File 'lib/asterisk-manager/event.rb', line 9 def type attributes['Event'] end |