module Compass::AppIntegration::Helpers

Public Instance Methods

lookup(project_type) click to toggle source
# File lib/compass/app_integration.rb, line 8
def lookup(project_type)
  eval "Compass::AppIntegration::#{camelize(project_type)}"
rescue NameError
  raise Compass::Error, "No application integration exists for #{project_type}"
end

Protected Instance Methods

camelize(s) click to toggle source

Stolen from ActiveSupport

# File lib/compass/app_integration.rb, line 17
def camelize(s)
  s.to_s.gsub(%r\/(.?)/) { "::#{$1.upcase}" }.gsub(%r(?:^|_)(.)/) { $1.upcase }
end