Module: Compass::AppIntegration::Helpers

Included in:
Compass::AppIntegration
Defined in:
lib/compass/app_integration.rb

Constant Summary

DEAFULT_PROJECT_TYPES =

attr_accessor :project_types

{
  :stand_alone => "Compass::AppIntegration::StandAlone"
}

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) default?

Returns:

  • (Boolean)


19
20
21
# File 'lib/compass/app_integration.rb', line 19

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

- (Object) init



11
12
13
# File 'lib/compass/app_integration.rb', line 11

def init
  @project_types ||= DEAFULT_PROJECT_TYPES.dup
end

- (Object) lookup(type)



23
24
25
26
27
28
29
# File 'lib/compass/app_integration.rb', line 23

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

- (Object) project_types



15
16
17
# File 'lib/compass/app_integration.rb', line 15

def project_types
  @project_types
end

- (Object) register(type, klass)



31
32
33
# File 'lib/compass/app_integration.rb', line 31

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