Class: Command::Console
- Inherits:
-
CommandBase
- Object
- CommandBase
- Command::Console
- Defined in:
- lib/command/console.rb
Instance Attribute Summary
Attributes inherited from CommandBase
Class Method Summary collapse
Instance Method Summary collapse
- #execute(argv) ⇒ Object
-
#initialize ⇒ Console
constructor
A new instance of Console.
Methods inherited from CommandBase
#disable_logging, #display_help!, execute!, #execute!, #force_change_settings_function, help, #hook_call, #load_local_settings, #tagname_to_ids
Constructor Details
#initialize ⇒ Console
Returns a new instance of Console.
14 15 16 17 18 19 20 |
# File 'lib/command/console.rb', line 14 def initialize super() @opt.separator <<~HELP ・開発時のみ有効になるコンソール。pry のインストール必須 HELP end |
Class Method Details
.oneline_help ⇒ Object
10 11 12 |
# File 'lib/command/console.rb', line 10 def self.oneline_help "開発用コンソール" end |
Instance Method Details
#execute(argv) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/command/console.rb', line 22 def execute(argv) $stdout = STDOUT super unless defined?(Pry) error "gem install pry をが必要です" exit Narou::EXIT_ERROR_CODE end Pry.start(TOPLEVEL_BINDING) end |