Class: DataType

Inherits:
Object
  • Object
show all
Defined in:
lib/sdx/vm/datatypes.rb

Direct Known Subclasses

Block, Bool, Function, InstantiatedObj, Int, IntInternal, List, NativeFn, Nil, Num, Obj, Str

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(val = nil) ⇒ DataType

Returns a new instance of DataType.



8
9
10
11
# File 'lib/sdx/vm/datatypes.rb', line 8

def initialize(val=nil) 
    @internal = val
    @fields = {}
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



5
6
7
# File 'lib/sdx/vm/datatypes.rb', line 5

def fields
  @fields
end

#internalObject (readonly)

Returns the value of attribute internal.



4
5
6
# File 'lib/sdx/vm/datatypes.rb', line 4

def internal
  @internal
end