Class: RMasm::DataType

Inherits:
Object show all
Defined in:
lib/rmasm/data_type.rb

Overview

General data class for Primitives and Struct

Direct Known Subclasses

Primitive, Struct

Class Method Summary collapse

Class Method Details

.read(io) ⇒ Object

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/rmasm/data_type.rb', line 36

def self.read(io)
  raise NotImplementedError.new
end

.sizeofObject

Return the sizeof of this datatype

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/rmasm/data_type.rb', line 27

def self.sizeof
  raise NotImplementedError.new
end

.valid?(arg) ⇒ Boolean

Validate the given value for this datatype

Returns:

  • (Boolean)


32
33
34
# File 'lib/rmasm/data_type.rb', line 32

def self.valid?(arg)
  true
end

.write(io, value) ⇒ Object

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/rmasm/data_type.rb', line 40

def self.write(io, value)
  raise NotImplementedError.new
end