Class: ReplRunner::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/repl_runner/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*commands) ⇒ Config

Returns a new instance of Config.



5
6
7
# File 'lib/repl_runner/config.rb', line 5

def initialize(*commands)
  @commands = commands
end

Instance Attribute Details

#commandsObject

Returns the value of attribute commands.



3
4
5
# File 'lib/repl_runner/config.rb', line 3

def commands
  @commands
end

Instance Method Details

#return_char(char) ⇒ Object



17
18
19
# File 'lib/repl_runner/config.rb', line 17

def return_char(char)
  @return_char = char
end

#startup_timeout(command) ⇒ Object



13
14
15
# File 'lib/repl_runner/config.rb', line 13

def startup_timeout(command)
  @startup_timeout = command
end

#sync_stdout(string) ⇒ Object



21
22
23
# File 'lib/repl_runner/config.rb', line 21

def sync_stdout(string)
  @sync_stdout = string
end

#terminate_command(command) ⇒ Object



9
10
11
# File 'lib/repl_runner/config.rb', line 9

def terminate_command(command)
  @terminate_command = command
end

#to_optionsObject



25
26
27
28
29
30
31
32
# File 'lib/repl_runner/config.rb', line 25

def to_options
  {
    terminate_command:  @terminate_command,
    startup_timeout:    @startup_timeout,
    return_char:        @return_char,
    sync_stdout:        @sync_stdout
  }
end