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

Returns:

  • (Object)

    the current value of oid



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

def oid
  @oid
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



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

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



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

def value
  @value
end

Instance Method Details

#id_after(path) ⇒ Object



9
10
11
# File 'lib/snmp/open/parser.rb', line 9

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