Class: Cucumber::Messages::PickleTableRow

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

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(cells: []) ⇒ PickleTableRow

Returns a new instance of PickleTableRow.



1262
1263
1264
1265
1266
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1262

def initialize(
  cells: []
)
  @cells = cells
end

Instance Attribute Details

#cellsObject (readonly)

Returns the value of attribute cells.



1260
1261
1262
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1260

def cells
  @cells
end

Class Method Details

.from_h(hash) ⇒ Object

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

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


735
736
737
738
739
740
741
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 735

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

  self.new(
    cells: hash[:cells]&.map { |item| PickleTableCell.from_h(item) },
  )
end