Class: Cucumber::Messages::PickleStepArgument

Inherits:
Message show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb

Overview

Represents the PickleStepArgument message in Cucumber’s message protocol.

An optional argument

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Message::Utils

included

Methods included from Message::Serialization

#to_h, #to_json

Methods included from Message::Deserialization

included

Constructor Details

#initialize(doc_string: nil, data_table: nil) ⇒ PickleStepArgument

Returns a new instance of PickleStepArgument.



1206
1207
1208
1209
1210
1211
1212
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1206

def initialize(
  doc_string: nil,
  data_table: nil
)
  @doc_string = doc_string
  @data_table = data_table
end

Instance Attribute Details

#data_tableObject (readonly)

Returns the value of attribute data_table.



1204
1205
1206
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1204

def data_table
  @data_table
end

#doc_stringObject (readonly)

Returns the value of attribute doc_string.



1202
1203
1204
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1202

def doc_string
  @doc_string
end

Class Method Details

.from_h(hash) ⇒ Object

Returns a new PickleStepArgument from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::PickleStepArgument.from_h(some_hash) # => #<Cucumber::Messages::PickleStepArgument:0x... ...>


677
678
679
680
681
682
683
684
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 677

def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    doc_string: PickleDocString.from_h(hash[:docString]),
    data_table: PickleTable.from_h(hash[:dataTable]),
  )
end