Class: SyncFiles::Config::Loader
- Inherits:
-
Object
- Object
- SyncFiles::Config::Loader
- Defined in:
- lib/sync_files/config/loader.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #has_config? ⇒ Boolean
-
#initialize ⇒ Loader
constructor
A new instance of Loader.
Constructor Details
#initialize ⇒ Loader
Returns a new instance of Loader.
11 12 13 |
# File 'lib/sync_files/config/loader.rb', line 11 def initialize @config = YAML.load(File.read(config_filename)) if config_filename end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/sync_files/config/loader.rb', line 9 def config @config end |
Instance Method Details
#has_config? ⇒ Boolean
15 16 17 |
# File 'lib/sync_files/config/loader.rb', line 15 def has_config? !@config.nil? end |