Class: EmacsSketch
- Defined in:
- lib/jruby_art/creators/sketch_writer.rb
Overview
A sketch that will run with jruby, for emacs etc
Instance Method Summary collapse
Methods inherited from Sketch
Instance Method Details
#code(param) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/jruby_art/creators/sketch_writer.rb', line 103 def code(param) lines = [ '# frozen_string_literal: false', "require 'jruby_art'", "require 'jruby_art/app'", BLANK, 'Processing::App::SKETCH_PATH = __FILE__.freeze', BLANK ] lines.concat class_methods(param) lines << BLANK lines << format('%s.new unless defined? $app', param.class_name) end |