Class: RubyAsterisk::AMI::Event
- Inherits:
-
Object
- Object
- RubyAsterisk::AMI::Event
- Defined in:
- lib/ruby-asterisk/ami/event.rb
Overview
Immutable value object representing a parsed AMI event. All attributes are frozen for thread-safe sharing.
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(headers, raw) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(headers, raw) ⇒ Event
Returns a new instance of Event.
14 15 16 17 18 19 |
# File 'lib/ruby-asterisk/ami/event.rb', line 14 def initialize(headers, raw) @name = headers['Event'].freeze @headers = headers @raw = raw freeze end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
10 11 12 |
# File 'lib/ruby-asterisk/ami/event.rb', line 10 def headers @headers end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/ruby-asterisk/ami/event.rb', line 10 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
10 11 12 |
# File 'lib/ruby-asterisk/ami/event.rb', line 10 def raw @raw end |