Module: ConfigSL::Collection
- Included in:
- Config
- Defined in:
- lib/configsl/collection.rb
Overview
Support options as collections.
This will format the values of the defined options when they are set on the config object. It will also format the values when they are retrieved, if they don't match their defined type.
The default behavior is to cast the value as the defined type. If the value is nil, it will be returned as is.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
35 36 37 38 |
# File 'lib/configsl/collection.rb', line 35 def self.included(base) base.include(Format) unless base.include?(Format) base.extend ClassMethods end |