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
the contents of the core_ext folder are utitility classes.
Constructor Details
#initialize ⇒ Compiler
Returns a new instance of Compiler.
9 |
# File 'lib/filipinomemes/compiler.rb', line 9 def initialize; end |
Instance Method Details
#zephyrum(code) ⇒ Object
the contents of the core_ext folder are utitility classes
12 13 14 15 16 17 18 19 20 |
# File 'lib/filipinomemes/compiler.rb', line 12 def zephyrum(code) #instantiating objects for compiler class ruby2ruby = Ruby2Ruby.new parser = RubyParser.new sexp = parser.process("# encoding: utf-8\n#{code}") ruby_code = ruby2ruby.process(sexp) "#{STARTING_CODE}#{ruby_code}" end |