Class: Processing::Inner
- Defined in:
- lib/ruby-processing/exporters/creator.rb
Overview
This class creates a pseudo ‘java inner class’ of the sketch
Constant Summary
Constants inherited from Creator
Instance Method Summary collapse
-
#create!(path, _args_) ⇒ Object
Create a pseudo inner class, given a path.
- #inner_class_template ⇒ Object
Methods inherited from Creator
Instance Method Details
#create!(path, _args_) ⇒ Object
Create a pseudo inner class, given a path.
154 155 156 157 158 159 160 161 162 163 |
# File 'lib/ruby-processing/exporters/creator.rb', line 154 def create!(path, _args_) return usage if /\?/ =~ path || /--help/ =~ path main_file = File.basename(path, '.rb') # allow uneeded extension input # Check to make sure that the main file doesn't exist already already_exist(path) @name = main_file.camelize writer = SketchWriter.new(main_file) template = inner_class_template writer.save(template) end |
#inner_class_template ⇒ Object
150 151 152 |
# File 'lib/ruby-processing/exporters/creator.rb', line 150 def inner_class_template format(INNER, @name) end |