Class: Gct::Command::Config::Set
- Inherits:
-
Gct::Command::Config
- Object
- CLAide::Command
- Gct::Command
- Gct::Command::Config
- Gct::Command::Config::Set
- Defined in:
- lib/gct/command/config/set.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Set
constructor
A new instance of Set.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Gct::Command
#auto_add_tag, #check_branch_can_be_update, #config_gitlab, #current_branch, #file_contents, #get_project, #gitlab_error, options, run
Constructor Details
#initialize(argv) ⇒ Set
Returns a new instance of Set.
16 17 18 19 20 |
# File 'lib/gct/command/config/set.rb', line 16 def initialize(argv) @key = argv.shift_argument @value = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
28 29 30 |
# File 'lib/gct/command/config/set.rb', line 28 def run FileBase.set_config(@key, @value) end |
#validate! ⇒ Object
22 23 24 25 26 |
# File 'lib/gct/command/config/set.rb', line 22 def validate! super help! '请输入key.' unless @key help! '请输入value.' unless @value end |