Class: Ree::Licensing::BytecodeCompiler
- Defined in:
- lib/ree/licensing/bytecode_compiler.rb
Class Method Summary collapse
- .compile_file(path) ⇒ Object
- .compile_string(source, path = "(eval)") ⇒ Object
- .load_from_binary(binary) ⇒ Object
Class Method Details
.compile_file(path) ⇒ Object
6 7 8 9 |
# File 'lib/ree/licensing/bytecode_compiler.rb', line 6 def self.compile_file(path) iseq = RubyVM::InstructionSequence.compile_file(path) iseq.to_binary end |
.compile_string(source, path = "(eval)") ⇒ Object
11 12 13 14 |
# File 'lib/ree/licensing/bytecode_compiler.rb', line 11 def self.compile_string(source, path = "(eval)") iseq = RubyVM::InstructionSequence.compile(source, path) iseq.to_binary end |
.load_from_binary(binary) ⇒ Object
16 17 18 |
# File 'lib/ree/licensing/bytecode_compiler.rb', line 16 def self.load_from_binary(binary) RubyVM::InstructionSequence.load_from_binary(binary) end |