Class: SNMP4JR::Message
- Inherits:
-
Object
- Object
- SNMP4JR::Message
- Defined in:
- lib/snmp4jr/message.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
- #[](oid) ⇒ Object
-
#initialize(event) ⇒ Message
constructor
A new instance of Message.
- #to_h ⇒ Object (also: #to_hash)
Constructor Details
#initialize(event) ⇒ Message
Returns a new instance of Message.
6 7 8 9 |
# File 'lib/snmp4jr/message.rb', line 6 def initialize(event) @event = event parse_event end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/snmp4jr/message.rb', line 4 def data @data end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
4 5 6 |
# File 'lib/snmp4jr/message.rb', line 4 def event @event end |
Instance Method Details
#[](oid) ⇒ Object
16 17 18 |
# File 'lib/snmp4jr/message.rb', line 16 def [](oid) data[oid] end |
#to_h ⇒ Object Also known as: to_hash
11 12 13 |
# File 'lib/snmp4jr/message.rb', line 11 def to_h data end |