Module: AmberVM::ActsAsAmberVMType
- Defined in:
- lib/amber/acts_as_rvm_type.rb
Overview
AmberVM::ActsAsAmberVMType is a mixin that allows to quickly publish classes and types to the rVM interpreter without going through the hassle of defining each function on it’s own and publisheing every varialbe that is watned.
The function to call is ActsAsAmberVMTypeMethods::acts_as_amber_type.
Example
class Test
# Add the readers and writers for
attr_accessor :var
include AmberVM::ActsAsAmberVMType
acts_as_amber_type
register_variable :var
register_function :to_s
end
Defined Under Namespace
Modules: ActsAsAmberVMTypeInstanceMethods, ActsAsAmberVMTypeMethods, ActsAsAmberVMTypeSingeltonMethods
Class Method Summary collapse
-
.included(mod) ⇒ Object
Called when included, loads the class methods and the instance methods needed.
Class Method Details
.included(mod) ⇒ Object
Called when included, loads the class methods and the instance methods needed.
44 45 46 |
# File 'lib/amber/acts_as_rvm_type.rb', line 44 def self.included(mod) mod.extend(AmberVM::ActsAsAmberVMType::ActsAsAmberVMTypeMethods) end |