class Processing::BasicSketch
This class creates bare sketches, with an optional render mode
Public Instance Methods
basic_template()
click to toggle source
Create a blank sketch, given a path.
# File lib/ruby-processing/exporters/creator.rb, line 101 def basic_template format(BASIC, @width, @height) end
basic_template_mode()
click to toggle source
# File lib/ruby-processing/exporters/creator.rb, line 105 def basic_template_mode format(BASIC_MODE, @width, @height, @mode) end
create!(path, args)
click to toggle source
# File lib/ruby-processing/exporters/creator.rb, line 109 def create!(path, args) return usage if /\?/ =~ path || /--help/ =~ path # Check to make sure that the main file doesn't exist already already_exist(path) main_file = File.basename(path, '.rb') # allow uneeded extension input writer = SketchWriter.new(main_file) @width = args[0] @height = args[1] @mode = args[2].upcase unless args[2].nil? template = @mode.nil? ? basic_template : basic_template_mode writer.save(template) end