Class: Jcompiler::Compiler
- Inherits:
-
Object
- Object
- Jcompiler::Compiler
- Defined in:
- lib/jcompiler/compiler.rb
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(source) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(source) ⇒ Compiler
Returns a new instance of Compiler.
2 3 4 |
# File 'lib/jcompiler/compiler.rb', line 2 def initialize(source) @source = source end |
Instance Method Details
#compile ⇒ Object
6 7 8 9 |
# File 'lib/jcompiler/compiler.rb', line 6 def compile json = Jcompiler::Provider.new eval(source) end |