Sha256: 764135ac613f9fee2bf4788ad05952fd653ce5f0c72bfc8cb5802049131c1685

Contents?: true

Size: 851 Bytes

Versions: 2

Compression:

Stored size: 851 Bytes

Contents

require "compass/app_integration/stand_alone"

module Compass
  module AppIntegration
    module Helpers
      #attr_accessor :project_types
      DEAFULT_PROJECT_TYPES = {
        :stand_alone => "Compass::AppIntegration::StandAlone"
      }

      def init
        @project_types ||= DEAFULT_PROJECT_TYPES.dup
      end

      def project_types
        @project_types
      end

      def default?
        @project_types.keys === DEAFULT_PROJECT_TYPES.keys
      end

      def lookup(type)
        unless @project_types[type].nil?
          eval @project_types[type]
        else
          raise Compass::Error, "No application integration exists for #{type}"
        end
      end

      def register(type, klass)
        @project_types[type] = klass
      end

    end
    extend Helpers
    init
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compass-sourcemaps-0.12.3.sourcemaps.a4836f1 lib/compass/app_integration.rb
compass-sourcemaps-0.12.2.sourcemaps.57a186c lib/compass/app_integration.rb