Class: SNMP4JR::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/snmp4jr/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/snmp4jr/message.rb', line 4

def data
  @data
end

#eventObject (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_hObject Also known as: to_hash



11
12
13
# File 'lib/snmp4jr/message.rb', line 11

def to_h
  data
end