class Cucumber::Messages::Pickle
#
Each ‘PickleStep` of a `Pickle` is matched with a `StepDefinition` to create a `TestCase`
with the complex structure of a [GherkinDocument](#io.cucumber.messages.GherkinDocument).
implementation of Cucumber itself becomes simpler, as it doesn’t have to deal
By making ‘Pickle` the main data structure Cucumber uses for execution, the
Excel files.
In the future a `Pickle` may be derived from other formats such as Markdown or
from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument).
A `Pickle` represents a template for a `TestCase`. It is typically derived
*
//// Pickles
#
Represents the Pickle message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::Pickle.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new Pickle from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( id: hash[:id], uri: hash[:uri], name: hash[:name], language: hash[:language], steps: hash[:steps]&.map { |item| PickleStep.from_h(item) }, tags: hash[:tags]&.map { |item| PickleTag.from_h(item) }, ast_node_ids: hash[:astNodeIds] ) end
def initialize(
def initialize( id: '', uri: '', name: '', language: '', steps: [], tags: [], ast_node_ids: [] ) @id = id @uri = uri @name = name @language = language @steps = steps @tags = tags @ast_node_ids = ast_node_ids super() end