Class: ThinkingSphinx::Commands::Base

Inherits:
Object
  • Object
show all
Includes:
WithOutput
Defined in:
lib/thinking_sphinx/commands/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from WithOutput

#initialize

Class Method Details

.call(configuration, options, stream = STDOUT) ⇒ Object



6
7
8
# File 'lib/thinking_sphinx/commands/base.rb', line 6

def self.call(configuration, options, stream = STDOUT)
  new(configuration, options, stream).call_with_handling
end

Instance Method Details

#call_with_handlingObject



10
11
12
13
14
# File 'lib/thinking_sphinx/commands/base.rb', line 10

def call_with_handling
  call
rescue Riddle::CommandFailedError => error
  handle_failure error.command_result
end