Class: TDL::ChallengeSessionConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/tdl/runner/challenge_session_config.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(journey_id) ⇒ ChallengeSessionConfig

Returns a new instance of ChallengeSessionConfig.



10
11
12
13
14
15
16
# File 'lib/tdl/runner/challenge_session_config.rb', line 10

def initialize(journey_id)
  @port = 8222
  @use_colours = true
  @recording_system_should_be_on = true
  @journey_id = journey_id
  @audit_stream = ConsoleAuditStream.new
end

Class Method Details

.for_journey_id(journey_id) ⇒ Object



6
7
8
# File 'lib/tdl/runner/challenge_session_config.rb', line 6

def self.for_journey_id(journey_id)
  ChallengeSessionConfig.new(journey_id)
end

Instance Method Details

#get_audit_streamObject



68
69
70
# File 'lib/tdl/runner/challenge_session_config.rb', line 68

def get_audit_stream
  @audit_stream
end

#get_hostnameObject



52
53
54
# File 'lib/tdl/runner/challenge_session_config.rb', line 52

def get_hostname
  @hostname
end

#get_journey_idObject



60
61
62
# File 'lib/tdl/runner/challenge_session_config.rb', line 60

def get_journey_id
  @journey_id
end

#get_portObject



56
57
58
# File 'lib/tdl/runner/challenge_session_config.rb', line 56

def get_port
  @port
end

#get_recording_system_should_be_onObject



48
49
50
# File 'lib/tdl/runner/challenge_session_config.rb', line 48

def get_recording_system_should_be_on
  @recording_system_should_be_on
end

#get_use_coloursObject



64
65
66
# File 'lib/tdl/runner/challenge_session_config.rb', line 64

def get_use_colours
  @use_colours
end

#get_working_directoryObject



72
73
74
# File 'lib/tdl/runner/challenge_session_config.rb', line 72

def get_working_directory
  @working_directory
end

#with_audit_stream(audit_stream) ⇒ Object



38
39
40
41
# File 'lib/tdl/runner/challenge_session_config.rb', line 38

def with_audit_stream(audit_stream)
  @audit_stream = audit_stream
  self
end

#with_colours(use_colours) ⇒ Object



28
29
30
31
# File 'lib/tdl/runner/challenge_session_config.rb', line 28

def with_colours(use_colours)
  @use_colours = use_colours
  self
end

#with_port(port) ⇒ Object



23
24
25
26
# File 'lib/tdl/runner/challenge_session_config.rb', line 23

def with_port(port)
  @port = port
  self
end

#with_recording_system_should_be_on(recording_system_should_be_on) ⇒ Object



33
34
35
36
# File 'lib/tdl/runner/challenge_session_config.rb', line 33

def with_recording_system_should_be_on(recording_system_should_be_on)
  @recording_system_should_be_on = recording_system_should_be_on
  self
end

#with_server_hostname(hostname) ⇒ Object



18
19
20
21
# File 'lib/tdl/runner/challenge_session_config.rb', line 18

def with_server_hostname(hostname)
  @hostname = hostname
  self
end

#with_working_directory(working_directory) ⇒ Object



43
44
45
46
# File 'lib/tdl/runner/challenge_session_config.rb', line 43

def with_working_directory(working_directory)
  @working_directory = working_directory
  self
end