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.
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
#host ⇒ Object (readonly)
Returns the value of attribute host.
6 7 8 |
# File 'lib/cucumber/wire_support/configuration.rb', line 6 def host @host end |
#port ⇒ Object (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( = nil) return @timeouts[.to_s] || 3 end |