Class: Jmpod::Command::Config::Get
- Inherits:
-
Jmpod::Command::Config
- Object
- CLAide::Command
- Jmpod::Command
- Jmpod::Command::Config
- Jmpod::Command::Config::Get
- Defined in:
- lib/jmpod/command/config/get.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Get
constructor
A new instance of Get.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Jmpod::Command
Constructor Details
#initialize(argv) ⇒ Get
Returns a new instance of Get.
15 16 17 18 19 |
# File 'lib/jmpod/command/config/get.rb', line 15 def initialize(argv) @name = argv.shift_argument super @additional_args = argv.remainder! end |
Instance Method Details
#run ⇒ Object
29 30 31 |
# File 'lib/jmpod/command/config/get.rb', line 29 def run puts "获取全局配置成功".green end |
#validate! ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/jmpod/command/config/get.rb', line 21 def validate! super help! 'A name for the Pod is required.' unless @name help! 'The Pod name cannot contain spaces.' if @name =~ /\s/ help! 'The Pod name cannot contain plusses.' if @name =~ /\+/ help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.' end |