lib/ruby-processing/exporters/base_exporter.rb
# Centralized method to read the source of the sketch and extract
# all the juicy details.
Centralized method to read the source of the sketch and extract
all the juicy details.
Centralized method to read the source of the sketch and extract all the juicy details .
def extract_information
      @info = {}
      @info[:source_code]     = source = read_source_code
      @info[:class_name]      = extract_class_name(source)
      @info[:title]           = extract_title(source)
      @info[:width]           = extract_dimension(source, 'width')
      @info[:height]          = extract_dimension(source, 'height')
      @info[:description]     = extract_description(source)
      @info[:libraries]       = extract_libraries(source)
      @info[:real_requires]   = extract_real_requires(source)
      hash_to_ivars @info
      @info
    end
def extract_information @info = { } @info [ :source_code ] = source = read_source_code @info [ :class_name ] = extract_class_name ( source ) @info [ :title ] = extract_title ( source ) @info [ :width ] = extract_dimension ( source , 'width' ) @info [ :height ] = extract_dimension ( source , 'height' ) @info [ :description ] = extract_description ( source ) @info [ :libraries ] = extract_libraries ( source ) @info [ :real_requires ] = extract_real_requires ( source ) hash_to_ivars @info @info end
Centralized method to read the source of the sketch and extract
all the juicy details.
Centralized method to read the source of the sketch and extract all the juicy details .
# Extract information from main file