Module: Optionable::DSL
- Defined in:
- lib/optionable/dsl.rb
Overview
Provides the entry point to the optionable DSL.
Instance Method Summary collapse
-
#option(key) ⇒ Optionable::Validator
Defines an option to be validated.
-
#optionable_validators ⇒ Hash<Symbol, Optionable::Validator>
Get all the validators for all options.
Instance Method Details
#option(key) ⇒ Optionable::Validator
Defines an option to be validated.
19 20 21 |
# File 'lib/optionable/dsl.rb', line 19 def option(key) optionable_validators[key] ||= Validator.new(key) end |
#optionable_validators ⇒ Hash<Symbol, Optionable::Validator>
Get all the validators for all options.
31 32 33 |
# File 'lib/optionable/dsl.rb', line 31 def optionable_validators @optionable_validators ||= {} end |