Class: Cucumber::WireSupport::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/wire_support/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wire_file) ⇒ Configuration

Returns a new instance of Configuration.



8
9
10
11
12
13
# File 'lib/cucumber/wire_support/configuration.rb', line 8

def initialize(wire_file)
  params = YAML.load_file(wire_file)
  @host = params['host']
  @port = params['port']
  @timeouts = default_timeouts.merge(params['timeout'] || {})
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



6
7
8
# File 'lib/cucumber/wire_support/configuration.rb', line 6

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



6
7
8
# File 'lib/cucumber/wire_support/configuration.rb', line 6

def port
  @port
end

Instance Method Details

#timeout(message = nil) ⇒ Object



15
16
17
# File 'lib/cucumber/wire_support/configuration.rb', line 15

def timeout(message = nil)
  return @timeouts[message.to_s] || 3
end