Class: Keoken::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/keoken/parser.rb

Direct Known Subclasses

Token

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script) ⇒ Parser

Returns a new instance of Parser.



4
5
6
7
# File 'lib/keoken/parser.rb', line 4

def initialize(script)
  binary = script.htb
  @data  = binary.bytes
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/keoken/parser.rb', line 3

def amount
  @amount
end

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/keoken/parser.rb', line 3

def data
  @data
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/keoken/parser.rb', line 3

def name
  @name
end

#transaction_typeObject

Returns the value of attribute transaction_type.



3
4
5
# File 'lib/keoken/parser.rb', line 3

def transaction_type
  @transaction_type
end