Class: Internal::ByteDecoder::Expression::Hash
- Inherits:
-
Internal::ByteDecoder::Expression
- Object
- Internal::ByteDecoder::Expression
- Internal::ByteDecoder::Expression::Hash
- Defined in:
- lib/decompiler/vm/bytedecoder.rb
Instance Attribute Summary
Attributes inherited from Internal::ByteDecoder::Expression
Instance Method Summary collapse
-
#initialize(pc, args) ⇒ Hash
constructor
A new instance of Hash.
- #precedence ⇒ Object
- #to_s ⇒ Object
Methods inherited from Internal::ByteDecoder::Expression
Constructor Details
#initialize(pc, args) ⇒ Hash
Returns a new instance of Hash.
231 232 233 234 |
# File 'lib/decompiler/vm/bytedecoder.rb', line 231 def initialize(pc, args) super(pc) @args = args end |
Instance Method Details
#precedence ⇒ Object
250 251 252 |
# File 'lib/decompiler/vm/bytedecoder.rb', line 250 def precedence return 1 end |
#to_s ⇒ Object
236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/decompiler/vm/bytedecoder.rb', line 236 def to_s s = '{ ' a = [] i = 0 while i < @args.length do a << "#{@args[i]} => #{@args[i + 1]}" i += 2 end s << a.join(', ') s << ' ' if a.length != 0 s << '}' return s end |