Class: RedmineCLI::Config
- Inherits:
-
NonConfig::Base
- Object
- NonConfig::Base
- RedmineCLI::Config
- Defined in:
- lib/redmine_cli/config.rb
Overview
Class that stores configuration and manipulates with it
Class Method Summary collapse
Class Method Details
.configure_rest ⇒ Object
11 12 13 14 15 |
# File 'lib/redmine_cli/config.rb', line 11 def self.configure_rest RedmineRest::Models.configure_models user: user, password: password, site: site end |
.create_config ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/redmine_cli/config.rb', line 17 def self.create_config defaults = { 'just_created' => true, 'user' => 'login', 'password' => 'password', 'site' => 'URL to Redmine' } File.open(@path_to_config, 'w') { |f| f.write defaults.to_yaml } end |
.new? ⇒ Boolean
25 26 27 |
# File 'lib/redmine_cli/config.rb', line 25 def self.new? self['just_created'] end |