Module: Configureasy
- Defined in:
- lib/configureasy.rb,
lib/configureasy/version.rb
Overview
Configureasy is a easy way to getting configs into you class/model
Example
class Foo
include Configureasy
end
Foo.config.some_key
=> 'some value'
class Bar
include Configureasy
config_name :barz #looks for APP_DIR/config/barz.yml
end
class FooBar
include Configureasy
def internal_access
value = self.class.some_key
...
end
end
Defined Under Namespace
Modules: Configurable Classes: Config, ConfigInvalid, ConfigNotFound, ConfigParser
Constant Summary collapse
- VERSION =
"1.0.1"
Class Method Summary collapse
-
.included(receiver) ⇒ Object
:nodoc:.
Class Method Details
.included(receiver) ⇒ Object
:nodoc:
32 33 34 |
# File 'lib/configureasy.rb', line 32 def self.included(receiver) # :nodoc: receiver.extend Configurable end |