Class: SyncFiles::Config::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/sync_files/config/loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLoader

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

#configObject (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

Returns:

  • (Boolean)


15
16
17
# File 'lib/sync_files/config/loader.rb', line 15

def has_config?
  !@config.nil?
end