Class: Droonga::Plugins::Groonga::GenericCommand
- Inherits:
-
Object
- Object
- Droonga::Plugins::Groonga::GenericCommand
- Defined in:
- lib/droonga/plugins/groonga/generic_command.rb
Direct Known Subclasses
ColumnCreate::Command, TableCreate::Command, TableRemove::Command
Defined Under Namespace
Classes: CommandError
Instance Method Summary collapse
- #execute(request) ⇒ Object
-
#initialize(context) ⇒ GenericCommand
constructor
A new instance of GenericCommand.
Constructor Details
#initialize(context) ⇒ GenericCommand
37 38 39 |
# File 'lib/droonga/plugins/groonga/generic_command.rb', line 37 def initialize(context) @context = context end |
Instance Method Details
#execute(request) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/droonga/plugins/groonga/generic_command.rb', line 41 def execute(request) @start_time = Time.now.to_f result = process_request(request) [header(Status::SUCCESS), result] rescue CommandError => error [header(error.status, error.), error.result] end |