Class: Gct::Command::Config::Get
- Inherits:
-
Gct::Command::Config
- Object
- CLAide::Command
- Gct::Command
- Gct::Command::Config
- Gct::Command::Config::Get
- Defined in:
- lib/gct/command/config/get.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Get
constructor
A new instance of Get.
- #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) ⇒ Get
Returns a new instance of Get.
15 16 17 18 |
# File 'lib/gct/command/config/get.rb', line 15 def initialize(argv) @key = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
25 26 27 |
# File 'lib/gct/command/config/get.rb', line 25 def run puts "#{FileBase.get_config(@key)}" end |
#validate! ⇒ Object
20 21 22 23 |
# File 'lib/gct/command/config/get.rb', line 20 def validate! super help! '请输入key.' unless @key end |