Module: Compass::AppIntegration::Helpers
- Included in:
- Compass::AppIntegration
- Defined in:
- lib/compass/app_integration.rb
Constant Summary collapse
- DEAFULT_PROJECT_TYPES =
attr_accessor :project_types
{ :stand_alone => "Compass::AppIntegration::StandAlone" }
Instance Method Summary collapse
- #default? ⇒ Boolean
- #init ⇒ Object
- #lookup(type) ⇒ Object
- #project_types ⇒ Object
- #register(type, klass) ⇒ Object
Instance Method Details
#default? ⇒ Boolean
19 20 21 |
# File 'lib/compass/app_integration.rb', line 19 def default? @project_types.keys === DEAFULT_PROJECT_TYPES.keys end |
#init ⇒ Object
11 12 13 |
# File 'lib/compass/app_integration.rb', line 11 def init @project_types ||= DEAFULT_PROJECT_TYPES.dup end |
#lookup(type) ⇒ Object
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 |
#project_types ⇒ Object
15 16 17 |
# File 'lib/compass/app_integration.rb', line 15 def project_types @project_types end |
#register(type, klass) ⇒ Object
31 32 33 |
# File 'lib/compass/app_integration.rb', line 31 def register(type, klass) @project_types[type] = klass end |