Class: Cangrejo::Modes::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/cangrejo/modes/local.rb

Direct Known Subclasses

Git

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_path) ⇒ Local

Returns a new instance of Local.



11
12
13
# File 'lib/cangrejo/modes/local.rb', line 11

def initialize(_path)
  @path = _path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/cangrejo/modes/local.rb', line 9

def path
  @path
end

#processObject (readonly)

Returns the value of attribute process.



9
10
11
# File 'lib/cangrejo/modes/local.rb', line 9

def process
  @process
end

Instance Method Details

#releaseObject



25
26
27
# File 'lib/cangrejo/modes/local.rb', line 25

def release
  stop_process(@process) unless @process.nil?
end

#setupObject



15
16
17
18
19
20
21
22
23
# File 'lib/cangrejo/modes/local.rb', line 15

def setup
  select_socket_file

  @process = prepare_process
  start_process @process

  wait_for_socket
  init_rest_client
end