Class: Filipinomemes::Compiler
- Inherits:
-
Object
- Object
- Filipinomemes::Compiler
- Defined in:
- lib/filipinomemes/compiler.rb
Constant Summary collapse
- STARTING_CODE =
"# encoding: utf-8\nrequire \"filipinomemes/core_ext\"\n".freeze
Instance Method Summary collapse
-
#initialize ⇒ Compiler
constructor
A new instance of Compiler.
- #zephyrum(code) ⇒ Object
Constructor Details
#initialize ⇒ Compiler
Returns a new instance of Compiler.
7 |
# File 'lib/filipinomemes/compiler.rb', line 7 def initialize; end |
Instance Method Details
#zephyrum(code) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/filipinomemes/compiler.rb', line 11 def zephyrum(code) ruby2ruby = Ruby2Ruby.new parser = RubyParser.new sexp = parser.process("# encoding: utf-8\n#{code}") ruby_code = ruby2ruby.process(sexp) "#{STARTING_CODE}#{ruby_code}" end |