Class: Settings::DataSource
- Inherits:
-
Object
- Object
- Settings::DataSource
- Defined in:
- lib/settings/data_source.rb,
lib/settings/data_source/env.rb,
lib/settings/data_source/file.rb,
lib/settings/data_source/hash.rb,
lib/settings/data_source/build.rb
Defined Under Namespace
Modules: Build Classes: Env, File, Hash
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(source) ⇒ DataSource
constructor
A new instance of DataSource.
Constructor Details
#initialize(source) ⇒ DataSource
Returns a new instance of DataSource.
5 6 7 |
# File 'lib/settings/data_source.rb', line 5 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'lib/settings/data_source.rb', line 3 def source @source end |
Class Method Details
.build(source = nil) ⇒ Object
9 10 11 12 13 |
# File 'lib/settings/data_source.rb', line 9 def self.build(source=nil) source = canonize(source) if respond_to? :canonize new(source) end |