Class: Droonga::Command::Remote::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/droonga/command/remote.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(serf_name, params) ⇒ Base

Returns a new instance of Base.



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/droonga/command/remote.rb', line 34

def initialize(serf_name, params)
  @serf_name = serf_name
  @params    = params
  @response  = {
    "log" => []
  }
  @serf = Serf.new(nil, @serf_name)

  @service_installation = ServiceInstallation.new
  @service_installation.ensure_using_service_base_directory

  log("params = #{params}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



32
33
34
# File 'lib/droonga/command/remote.rb', line 32

def response
  @response
end

Instance Method Details

#processObject



48
49
50
# File 'lib/droonga/command/remote.rb', line 48

def process
  # override me!
end

#should_process?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/droonga/command/remote.rb', line 52

def should_process?
  for_me? or @params.nil? or not @params.include?("node")
end