Class: WSDirector::ScenarioReader
- Inherits:
-
Object
- Object
- WSDirector::ScenarioReader
- Defined in:
- lib/wsdirector/scenario_reader.rb
Overview
Read and parse YAML scenario
Constant Summary collapse
- MULTIPLIER_FORMAT =
/^[-+*\\\d ]+$/
Class Method Summary collapse
Class Method Details
.parse(file_path) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/wsdirector/scenario_reader.rb', line 9 def parse(file_path) contents = YAML.load_file(file_path) if contents.first.key?("client") parse_multiple_scenarios(contents) else { "total" => 1, "clients" => [parse_simple_scenario(contents)] } end end |