Class: EmacsSketch
- Defined in:
- lib/jruby_art/creators/sketch_writer.rb
Overview
A sketch that will run with jruby, for emacs etc
Instance Attribute Summary
Attributes inherited from Sketch
Instance Method Summary collapse
Methods inherited from Sketch
#class_methods, #initialize, #methods
Constructor Details
This class inherits a constructor from Sketch
Instance Method Details
#code ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/jruby_art/creators/sketch_writer.rb', line 109 def code lines = [ '# frozen_string_literal: false', "require 'jruby_art'", "require 'jruby_art/app'", BLANK, 'Processing::App::SKETCH_PATH = __FILE__.freeze', BLANK ] lines.concat class_methods lines << BLANK lines << format('%s.new if Processing.app.nil?', param.class_name) end |