Class: Repomate::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/repomate/config.rb', line 9

def initialize
  # Set defaults
  @home_path = ENV['HOME']
  @code_path = "#{@home_path}/code"
  @config_file_path = "#{@home_path}/.config/repomate/repos.txt"
  @command = 'sync'
  @repo_url = nil

  parse_options
  ensure_directories
end

Instance Attribute Details

#code_pathObject (readonly)

Returns the value of attribute code_path.



7
8
9
# File 'lib/repomate/config.rb', line 7

def code_path
  @code_path
end

#commandObject (readonly)

Returns the value of attribute command.



7
8
9
# File 'lib/repomate/config.rb', line 7

def command
  @command
end

#config_file_pathObject (readonly)

Returns the value of attribute config_file_path.



7
8
9
# File 'lib/repomate/config.rb', line 7

def config_file_path
  @config_file_path
end

#home_pathObject (readonly)

Returns the value of attribute home_path.



7
8
9
# File 'lib/repomate/config.rb', line 7

def home_path
  @home_path
end

#repo_urlObject (readonly)

Returns the value of attribute repo_url.



7
8
9
# File 'lib/repomate/config.rb', line 7

def repo_url
  @repo_url
end