Class: Bashly::Config
- Inherits:
-
Object
- Object
- Bashly::Config
- Defined in:
- lib/bashly/config.rb
Overview
A convenience class to use either a hash or a filename as a configuration source
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/bashly/config.rb', line 7 def config @config end |
Class Method Details
.new(config) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/bashly/config.rb', line 9 def self.new(config) if config.is_a? String YAML.load_file config else config end end |