Class: Cucumber::Messages::PickleTable

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(rows: []) ⇒ PickleTable

Returns a new instance of PickleTable.



1226
1227
1228
1229
1230
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1226

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

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



1224
1225
1226
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1224

def rows
  @rows
end

Class Method Details

.from_h(hash) ⇒ Object

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

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


697
698
699
700
701
702
703
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 697

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

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