Method: CukeModeler::Example#initialize

Defined in:
lib/cuke_modeler/models/example.rb

#initialize(source_text = nil) ⇒ Example

Creates a new Example object and, if source_text is provided, populates the object.

Examples:

Example.new
Example.new("|param_1|param_2|\n|value_1|value_2|")

Parameters:

  • source_text (String) (defaults to: nil)

    The Gherkin text that will be used to populate the model

Raises:

  • (ArgumentError)

    If source_text is not a String



34
35
36
37
38
39
# File 'lib/cuke_modeler/models/example.rb', line 34

def initialize(source_text = nil)
  @tags = []
  @rows = []

  super(source_text)
end