Class: JavaBin::Pure::Parser
- Inherits:
-
Object
- Object
- JavaBin::Pure::Parser
- Defined in:
- lib/java_bin/pure/parser.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#tag_byte ⇒ Object
readonly
Returns the value of attribute tag_byte.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #parse(input) ⇒ Object
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
46 47 |
# File 'lib/java_bin/pure/parser.rb', line 46 def initialize end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
44 45 46 |
# File 'lib/java_bin/pure/parser.rb', line 44 def current @current end |
#input ⇒ Object (readonly)
Returns the value of attribute input.
44 45 46 |
# File 'lib/java_bin/pure/parser.rb', line 44 def input @input end |
#tag_byte ⇒ Object (readonly)
Returns the value of attribute tag_byte.
44 45 46 |
# File 'lib/java_bin/pure/parser.rb', line 44 def tag_byte @tag_byte end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
44 45 46 |
# File 'lib/java_bin/pure/parser.rb', line 44 def version @version end |
Instance Method Details
#parse(input) ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/java_bin/pure/parser.rb', line 49 def parse(input) array = input.unpack("C*") check_version(array[0]) @current = 0 @input = array @version = getbyte @tag_byte = nil read_val end |