Class: Cucumber::WireSupport::Configuration
- Defined in:
- lib/cucumber/wire_support/configuration.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(wire_file) ⇒ Configuration
constructor
A new instance of Configuration.
- #timeout(message = nil) ⇒ Object
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
#host ⇒ Object (readonly)
Returns the value of attribute host.
4 5 6 |
# File 'lib/cucumber/wire_support/configuration.rb', line 4 def host @host end |
#port ⇒ Object (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( = nil) return @timeouts[.to_s] || 3 end |