Module: Gish::Configuration
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#browser ⇒ Object
Returns the value of attribute browser.
-
#editor ⇒ Object
Returns the value of attribute editor.
-
#repository ⇒ Object
Returns the value of attribute repository.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from InputHelpers
#capture_editor_input, #confirm, #prompt
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
6 7 8 |
# File 'lib/gish/configuration.rb', line 6 def access_token @access_token end |
#browser ⇒ Object
Returns the value of attribute browser.
6 7 8 |
# File 'lib/gish/configuration.rb', line 6 def browser @browser end |
#editor ⇒ Object
Returns the value of attribute editor.
6 7 8 |
# File 'lib/gish/configuration.rb', line 6 def editor @editor end |
#repository ⇒ Object
Returns the value of attribute repository.
6 7 8 |
# File 'lib/gish/configuration.rb', line 6 def repository @repository end |
Class Method Details
.extended(base) ⇒ Object
8 9 10 |
# File 'lib/gish/configuration.rb', line 8 def self.extended(base) base.defaults end |
Instance Method Details
#defaults ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/gish/configuration.rb', line 32 def defaults @config_file = File.('~/.gish') self.access_token = retrieve_or_generate_token self.editor = (ENV['GISH_EDITOR'] || ENV['EDITOR']) || 'vi' self.browser = (ENV['GISH_BROWSER'] || ENV['BROWSER']) || 'open' self.repository = default_repository end |
#github_url ⇒ Object
28 29 30 |
# File 'lib/gish/configuration.rb', line 28 def github_url "http://github.com/#{@repository}" end |