Class: Escort::Setup::Configuration::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/escort/setup/configuration/reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Reader


9
10
11
# File 'lib/escort/setup/configuration/reader.rb', line 9

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path


7
8
9
# File 'lib/escort/setup/configuration/reader.rb', line 7

def path
  @path
end

Instance Method Details

#readObject


13
14
15
16
17
# File 'lib/escort/setup/configuration/reader.rb', line 13

def read
  data = {}
  data = load_config_at_path if path
  Instance.new(path, data)
end