Class: AsteriskManager::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/asterisk-manager/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject

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

#typeObject



9
10
11
# File 'lib/asterisk-manager/event.rb', line 9

def type
  attributes['Event']
end