Module: ConfigSL::DSL::ClassMethods
- Defined in:
- lib/configsl/dsl.rb
Overview
Required class methods for the config DSL.
Instance Method Summary collapse
-
#option(name, opts = {}) ⇒ void
Define an option for the class.
-
#options ⇒ Hash
Returns the options hash for the class.
Instance Method Details
#option(name, opts = {}) ⇒ void
This method returns an undefined value.
Define an option for the class.
The keys for the options hash will vary depending on the modules that have been included in your class.
82 83 84 85 |
# File 'lib/configsl/dsl.rb', line 82 def option(name, opts = {}) .merge!({ name => opts }) define_method(name) { get_value(name) } end |
#options ⇒ Hash
Returns the options hash for the class.
90 91 92 |
# File 'lib/configsl/dsl.rb', line 90 def @options ||= {} end |