Sha256: da4b34dcf6591702debdb1143e8801f5c71c17cd2cad9c1f81e934c5faa23cca

Contents?: true

Size: 569 Bytes

Versions: 63

Compression:

Stored size: 569 Bytes

Contents

%w(stand_alone rails merb).each do |lib|
  require "compass/app_integration/#{lib}"
end

module Compass
  module AppIntegration
    module Helpers
      def lookup(project_type)
        eval "Compass::AppIntegration::#{camelize(project_type)}"
      rescue NameError
        raise Compass::Error, "No application integration exists for #{project_type}"
      end

      protected

      # Stolen from ActiveSupport
      def camelize(s)
        s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
      end

    end
    extend Helpers
  end
end

Version data entries

63 entries across 62 versions & 5 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/compass-0.11.7/lib/compass/app_integration.rb
compass-0.11.7 lib/compass/app_integration.rb
compass-0.12.alpha.4 lib/compass/app_integration.rb
compass-0.12.alpha.3 lib/compass/app_integration.rb
compass-0.11.6 lib/compass/app_integration.rb
compass-0.12.alpha.2 lib/compass/app_integration.rb
compass-0.12.alpha.1 lib/compass/app_integration.rb
compass-0.12.alpha.0 lib/compass/app_integration.rb
compass-rails31-0.12.0.alpha.0.91a748a lib/compass/app_integration.rb
compass-0.11.5 lib/compass/app_integration.rb
compass-0.11.4 lib/compass/app_integration.rb
compass-0.11.3 lib/compass/app_integration.rb
compass-0.11.2 lib/compass/app_integration.rb
compass-0.11.1 lib/compass/app_integration.rb
compass-0.11.0 lib/compass/app_integration.rb
compass-0.11.beta.7 lib/compass/app_integration.rb
compass-0.11.beta.6 lib/compass/app_integration.rb
compass-0.11.beta.5 lib/compass/app_integration.rb
compass-0.11.beta.4 lib/compass/app_integration.rb
compass-0.11.beta.3 lib/compass/app_integration.rb