class Verto::BaseCommand
Public Class Methods
exit_on_failure?()
click to toggle source
# File lib/verto/commands/base_command.rb, line 5 def self.exit_on_failure? true end
Private Instance Methods
call_hooks(moments = [], with_attributes: {})
click to toggle source
# File lib/verto/commands/base_command.rb, line 23 def call_hooks(moments = [], with_attributes: {}) moments_to_call = ([] << moments).flatten moments_to_call.each do |moment| Verto.config.hooks .select { |hook| hook.moment == moment.to_sym } .each do |hook| Verto.current_moment = hook.moment hook.call(with_attributes: with_attributes) end end end
command_error!(message)
click to toggle source
# File lib/verto/commands/base_command.rb, line 11 def command_error!(message) raise Verto::CommandError, message end
options()
click to toggle source
Calls superclass method
# File lib/verto/commands/base_command.rb, line 15 def options Verto.config.command_options.merge!(super) end
stderr()
click to toggle source
# File lib/verto/commands/base_command.rb, line 19 def stderr Verto.stderr end