Quakespotter.app/lib/ruby-processing/exporters/base_exporter.rb
def extract_dimension(source, dimension)
      match = source.match(/#{@info[:class_name]}\.new.*?:#{dimension}\s?=>\s?(\d+)/m)
      size_match = source.match(/^[^#]*size\(?\s*(\d+)\s*,\s*(\d+)\s*\)?/)
      return match[1] if match
      return (dimension == 'width' ? size_match[1] : size_match[2]) if size_match
      DEFAULT_DIMENSIONS[dimension]
    end
# Searches the source for the width and height of the sketch.
Searches the source for the width and height of the sketch.
Searches the source for the width and height of the sketch .
def extract_dimension(source, dimension)
      match = source.match(/#{@info[:class_name]}\.new.*?:#{dimension}\s?=>\s?(\d+)/m)
      size_match = source.match(/^[^#]*size\(?\s*(\d+)\s*,\s*(\d+)\s*\)?/)
      return match[1] if match
      return (dimension == 'width' ? size_match[1] : size_match[2]) if size_match
      DEFAULT_DIMENSIONS[dimension]
    end
def extract_dimension ( source , dimension ) match = source . match ( / #{ @info [ :class_name ] } \. new.*?: #{ dimension } \s ?=> \s ?( \d +) /m ) size_match = source . match ( / ^[^#]*size \( ? \s *( \d +) \s *, \s *( \d +) \s * \) ? / ) return match [ 1 ] if match return ( dimension == 'width' ? size_match [ 1 ] : size_match [ 2 ] ) if size_match DEFAULT_DIMENSIONS [ dimension ] end
Searches the source for the width and height of the sketch.
Searches the source for the width and height of the sketch .
source
dimension