class Cucumber::Messages::Suggestion
#
A suggested fragment of code to implement an undefined step
#
Represents the Suggestion message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::Suggestion.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new Suggestion from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( id: hash[:id], pickle_step_id: hash[:pickleStepId], snippets: hash[:snippets]&.map { |item| Snippet.from_h(item) } ) end
def initialize(
def initialize( id: '', pickle_step_id: '', snippets: [] ) @id = id @pickle_step_id = pickle_step_id @snippets = snippets super() end