Class: ItunesConnect::RcFile

Inherits:
Object
  • Object
show all
Defined in:
lib/itunes_connect/rc_file.rb

Overview

:nodoc:

Constant Summary collapse

DEFAULT_RCFILE_PATH =
File.expand_path("~/.itunesrc")

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path = DEFAULT_RCFILE_PATH) ⇒ RcFile

Returns a new instance of RcFile.



11
12
13
14
15
16
17
# File 'lib/itunes_connect/rc_file.rb', line 11

def initialize(path=DEFAULT_RCFILE_PATH)
  if File.exist?(path)
    @rc = YAML.load_file(path)
  else
    @rc = { }
  end
end

Class Method Details

.defaultObject



7
8
9
# File 'lib/itunes_connect/rc_file.rb', line 7

def self.default
  self.new(DEFAULT_RCFILE_PATH)
end

Instance Method Details

#databaseObject



27
28
29
# File 'lib/itunes_connect/rc_file.rb', line 27

def database
  @rc[:database]
end

#passwordObject



23
24
25
# File 'lib/itunes_connect/rc_file.rb', line 23

def password
  @rc[:password]
end

#usernameObject



19
20
21
# File 'lib/itunes_connect/rc_file.rb', line 19

def username
  @rc[:username]
end