Class: Convoy::Setup::Configuration::Reader

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Reader

Returns a new instance of Reader.



9
10
11
# File 'lib/convoy/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/convoy/setup/configuration/reader.rb', line 7

def path
  @path
end

Instance Method Details

#readObject



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

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