Module: SpecistentClient

Defined in:
lib/specistent/specistent_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#branchObject

Returns the value of attribute branch.



8
9
10
# File 'lib/specistent/specistent_client.rb', line 8

def branch
  @branch
end

#connectedObject (readonly)

Returns the value of attribute connected.



9
10
11
# File 'lib/specistent/specistent_client.rb', line 9

def connected
  @connected
end

#filesObject

Returns the value of attribute files.



8
9
10
# File 'lib/specistent/specistent_client.rb', line 8

def files
  @files
end

#remoteObject

Returns the value of attribute remote.



8
9
10
# File 'lib/specistent/specistent_client.rb', line 8

def remote
  @remote
end

Instance Method Details

#initializeObject



11
12
13
# File 'lib/specistent/specistent_client.rb', line 11

def initialize()
  @connected = true
end

#receive_data(data) ⇒ Object



20
21
22
23
# File 'lib/specistent/specistent_client.rb', line 20

def receive_data(data)
  print data
  STDOUT.flush
end

#start_specObject



15
16
17
18
# File 'lib/specistent/specistent_client.rb', line 15

def start_spec 
  return puts "NO files" if files.empty?
  send_data "run #{remote}/#{branch} #{files.join(' ')};"
end

#unbindObject



25
26
27
# File 'lib/specistent/specistent_client.rb', line 25

def unbind
  @connected = false
end