Method: Processing::BaseExporter#extract_class_name

Defined in:
lib/ruby-processing/exporters/base_exporter.rb

#extract_class_name(source) ⇒ Object

Searches the source for a class name.



39
40
41
42
# File 'lib/ruby-processing/exporters/base_exporter.rb', line 39

def extract_class_name(source)
  match = source.match(/(\w+)\s*<\s*Processing::App/)
  match ? match[1] : 'Sketch'
end