Class: SNMP::Open::Value

Inherits:
Struct
  • Object
show all
Defined in:
lib/snmp/open/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#oidObject

Returns the value of attribute oid



6
7
8
# File 'lib/snmp/open/parser.rb', line 6

def oid
  @oid
end

#typeObject

Returns the value of attribute type



6
7
8
# File 'lib/snmp/open/parser.rb', line 6

def type
  @type
end

#valueObject

Returns the value of attribute value



6
7
8
# File 'lib/snmp/open/parser.rb', line 6

def value
  @value
end

Instance Method Details

#id_after(path) ⇒ Object



7
8
9
# File 'lib/snmp/open/parser.rb', line 7

def id_after(path)
  oid.sub(/^#{path}\./, '') if oid.start_with?(path)
end