Class: V8::Conversion::Constructor

Inherits:
Object
  • Object
show all
Includes:
Error::Protect
Defined in:
lib/v8/conversion/class.rb

Defined Under Namespace

Modules: Args

Instance Method Summary collapse

Methods included from Error::Protect

#protect

Constructor Details

#initialize(cls) ⇒ Constructor

Returns a new instance of Constructor.



22
23
24
# File 'lib/v8/conversion/class.rb', line 22

def initialize(cls)
  @class = cls
end

Instance Method Details

#call(arguments) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/v8/conversion/class.rb', line 26

def call(arguments)
  arguments.extend Args
  protect do
    if arguments.linkage_call?
      arguments.link
    else
      arguments.construct @class
    end
  end
  return arguments.This()
end