class PhilColumns::Cli::List
Public Class Methods
env_option()
click to toggle source
# File lib/phil_columns/cli/list.rb, line 12 def self.env_option option :env, type: :string, aliases: '-e', desc: "The environment to execute in", default: 'development' end
handle_argument_error( command, error, _, __ )
click to toggle source
# File lib/phil_columns/cli/list.rb, line 45 def self.handle_argument_error( command, error, _, __ ) method = "handle_argument_error_for_#{command.name}" if respond_to?( method ) send( method, command, error ) else handle_argument_error_default( command, error ) end end
handle_argument_error_default( command, error )
click to toggle source
# File lib/phil_columns/cli/list.rb, line 55 def self.handle_argument_error_default( command, error ) $stdout.puts "Incorrect usage of list subcommand: #{command.name}" $stdout.puts " #{error.message}", '' $stdout.puts "For correct usage:" $stdout.puts " phil_columns list help #{command.name}" end
handle_no_command_error( name )
click to toggle source
# File lib/phil_columns/cli/list.rb, line 62 def self.handle_no_command_error( name ) $stdout.puts "Unrecognized command: #{name}" end
operation_option()
click to toggle source
# File lib/phil_columns/cli/list.rb, line 16 def self.operation_option option :operation, type: :string, aliases: '-o', desc: "The operation: all or any", default: 'any' end
Public Instance Methods
tagged_with( *tags )
click to toggle source
# File lib/phil_columns/cli/list.rb, line 30 def tagged_with( *tags ) PhilColumns::Command::List::TaggedWith.new( options.merge( tags: tags )).execute end