Module: Coconut
- Includes:
- Dsl
- Defined in:
- lib/coconut.rb,
lib/coconut/config.rb,
lib/coconut/version.rb,
lib/coconut/dsl/asset.rb,
lib/coconut/dsl/application.rb,
lib/coconut/dsl/asset_setup.rb,
lib/coconut/dsl/blank_slate.rb,
lib/coconut/dsl/environment.rb,
lib/coconut/dsl/asset_folder.rb,
lib/coconut/dsl/asset_file_list.rb
Defined Under Namespace
Modules: Dsl
Classes: Config
Constant Summary
collapse
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
14
15
16
17
18
19
|
# File 'lib/coconut.rb', line 14
def self.configure(namespace, &config)
config = Application.configure(environment, &config)
check_for_unconfigured_assets(config)
define_config_method(namespace, config)
define_config_constant(namespace, config)
end
|
.environment ⇒ Object
21
22
23
24
|
# File 'lib/coconut.rb', line 21
def self.environment
return @_coconut_environment.() unless @_coconut_environment.nil?
ENV['RACK_ENV'] || :development
end
|
.included(base) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/coconut.rb', line 7
def self.included(base)
configure_method = method(:configure)
base.singleton_class.instance_eval do
define_method(:configure) { |*args, &block| configure_method.(base, &block) }
end
end
|
.take_environment_from(&block) ⇒ Object
26
27
28
|
# File 'lib/coconut.rb', line 26
def self.take_environment_from(&block)
@_coconut_environment = block
end
|