Class: Dvi::Opcode::XXX

Inherits:
Base
  • Object
show all
Defined in:
lib/dvi/opcode.rb

Overview

XXX is a class for xxx1 … xxx4 opcodes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

range, set_range

Constructor Details

#initialize(content, n) ⇒ XXX

Returns a new instance of XXX.



375
376
377
# File 'lib/dvi/opcode.rb', line 375

def initialize(content, n)
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



373
374
375
# File 'lib/dvi/opcode.rb', line 373

def content
  @content
end

Class Method Details

.read(cmd, io) ⇒ Object



379
380
381
382
383
384
# File 'lib/dvi/opcode.rb', line 379

def self.read(cmd, io)
  n = cmd - 238
  size = buf.__send__("read_uint" + n.to_s)
  content = io.read(size)
  return self.new(content, n)
end

Instance Method Details

#interpret(ps) ⇒ Object

do nothing



387
# File 'lib/dvi/opcode.rb', line 387

def interpret(ps); end