SPVM::ExchangeAPI::Class − Class Object
"SPVM::BlessedObject::Class" is a class object to call class methods.
# The same as
the Int−>__new(1) in the SPVM language
my $class = SPVM::ExchangeAPI::Class−>__new(__name
=> 'Int', __api => $api);
my $value = $class−>new(1);
It is easy to use SPVM::ExchangeAPI#class.
my $class =
$api−>class('Int');
$class−>new(1);
my $name =
$self−>__name;
$self−>__name($name);
Gets and sets a class name.
my $api =
$self−>__api;
$self−>__api($api);
Gets and sets a SPVM::ExchangeAPI object.
my $class = SPVM::ExchangeAPI::Class−>__new(%options);
Creates a new "SPVM::ExchangeAPI::Class" object.
Options:
|
• |
"__name" : string |
A class name
|
• |
"__api" : SPVM::ExchangeAPI |
A SPVM::ExchangeAPI object
$class−>foo(@args);
Calls SPVM::ExchangeAPI#call_method using "__name" field and the method name given in "AUTOLOAD" method.
Copyright (c) 2023 Yuki Kimoto
MIT License