Class: GrowlGithubFeed::Config
- Inherits:
-
Object
- Object
- GrowlGithubFeed::Config
- Defined in:
- lib/growl-github-feed/config.rb
Instance Attribute Summary collapse
-
#pass ⇒ Object
readonly
Returns the value of attribute pass.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 14 15 16 17 |
# File 'lib/growl-github-feed/config.rb', line 9 def initialize # set user parameters local_user = ENV["USER"] config = ParseConfig.new("/Users/#{local_user}/.gitconfig") @user = config['github']['user'] @token= config['github']['token'] @user = ask("Github user name: ") if @user.nil? @pass = ask("Github password: ") { |q| q.echo = false } if @token.nil? end |
Instance Attribute Details
#pass ⇒ Object (readonly)
Returns the value of attribute pass.
7 8 9 |
# File 'lib/growl-github-feed/config.rb', line 7 def pass @pass end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/growl-github-feed/config.rb', line 7 def token @token end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
7 8 9 |
# File 'lib/growl-github-feed/config.rb', line 7 def user @user end |