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.



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

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

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



4
5
6
# File 'lib/cucumber/wire_support/configuration.rb', line 4

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



4
5
6
# File 'lib/cucumber/wire_support/configuration.rb', line 4

def port
  @port
end

Instance Method Details

#timeout(message = nil) ⇒ Object



13
14
15
# File 'lib/cucumber/wire_support/configuration.rb', line 13

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