Class: ThinkingSphinx::RakeInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/rake_interface.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{:verbose => true}

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ RakeInterface

Returns a new instance of RakeInterface.



6
7
8
9
# File 'lib/thinking_sphinx/rake_interface.rb', line 6

def initialize(options = {})
  @options           = DEFAULT_OPTIONS.merge options
  @options[:verbose] = false if @options[:silent]
end

Instance Method Details

#configureObject



11
12
13
# File 'lib/thinking_sphinx/rake_interface.rb', line 11

def configure
  ThinkingSphinx::Commander.call :configure, configuration, options
end

#daemonObject



15
16
17
# File 'lib/thinking_sphinx/rake_interface.rb', line 15

def daemon
  @daemon ||= ThinkingSphinx::Interfaces::Daemon.new configuration, options
end

#rtObject



19
20
21
# File 'lib/thinking_sphinx/rake_interface.rb', line 19

def rt
  @rt ||= ThinkingSphinx::Interfaces::RealTime.new configuration, options
end

#sqlObject



23
24
25
# File 'lib/thinking_sphinx/rake_interface.rb', line 23

def sql
  @sql ||= ThinkingSphinx::Interfaces::SQL.new configuration, options
end