# 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
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