Class: SNMP::Open::Parser::ValueParser::Bits
- Inherits:
-
SNMP::Open::Parser::ValueParser
- Object
- SNMP::Open::Parser::ValueParser
- SNMP::Open::Parser::ValueParser::Bits
- Defined in:
- lib/snmp/open/parser/value_parser.rb
Overview
parses BITS
Constant Summary
Constants inherited from SNMP::Open::Parser::ValueParser
Constants included from Constants
Constants::NOMOREVARIABLES_STR, Constants::NOSUCHINSTANCE_STR, Constants::NOSUCHOBJECT_STR
Instance Method Summary collapse
Methods inherited from SNMP::Open::Parser::ValueParser
Constructor Details
This class inherits a constructor from SNMP::Open::Parser::ValueParser
Instance Method Details
#parse(tokens) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/snmp/open/parser/value_parser.rb', line 24 def parse(tokens) return @parse if @parse bytes = [] loop do break unless tokens.peek =~ /\A[0-9A-Za-z]{1,2}\z/ bytes << tokens.next.to_i(16) end @parse = [@type, bytes] end |