Class: Charyf::Command::ConsoleCommand
- Includes:
- EnvironmentArgument
- Defined in:
- lib/charyf/utils/commands/console/console_command.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(args = [], local_options = {}, config = {}) ⇒ ConsoleCommand
constructor
A new instance of ConsoleCommand.
- #perform ⇒ Object
Methods included from EnvironmentArgument
Methods inherited from Base
banner, base_name, command_name, desc, desc_file, executable, #help, hide_command!, inherited, namespace, perform, printing_commands
Methods included from Actions
#load_generators, #require_application_and_environment!, #start_interfaces!, #start_pipeline!
Constructor Details
#initialize(args = [], local_options = {}, config = {}) ⇒ ConsoleCommand
Returns a new instance of ConsoleCommand.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/charyf/utils/commands/console/console_command.rb', line 50 def initialize(args = [], = {}, config = {}) = [] # For the same behavior as OptionParser, leave only options after "--" in ARGV. termination = .find_index("--") if termination = [termination + 1..-1] = [0...termination] end ARGV.replace() super(args, , config) end |
Instance Method Details
#perform ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'lib/charyf/utils/commands/console/console_command.rb', line 64 def perform extract_environment_option # CHARYF_ENV needs to be set before application is required. ENV["CHARYF_ENV"] = [:environment] require_application_and_environment! Charyf::Console.start(Charyf.application, ) end |