Class: NativeFnInternal

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(val = nil) ⇒ NativeFnInternal

Returns a new instance of NativeFnInternal.



17
18
19
20
# File 'lib/sdx/vm/datatypes.rb', line 17

def initialize(val=nil)
    @internal = val
    @arity = IntInternal.new val.arity
end

Instance Attribute Details

#arityObject (readonly)

Returns the value of attribute arity.



15
16
17
# File 'lib/sdx/vm/datatypes.rb', line 15

def arity
  @arity
end

Instance Method Details

#call(*args) ⇒ Object



22
23
24
# File 'lib/sdx/vm/datatypes.rb', line 22

def call(*args)
    @internal.call *args
end