class Cucumber::Messages::TableRow
Represents the TableRow message in Cucumberโs message protocol.
A row in a table
Attributes
Cells in the row
The location of the first cell in the row
Public Class Methods
Source
# File lib/cucumber/messages/table_row.rb, line 43 def self.from_h(hash) return nil if hash.nil? new( location: Location.from_h(hash[:location]), cells: hash[:cells]&.map { |item| TableCell.from_h(item) }, id: hash[:id] ) end
Returns a new TableRow from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::TableRow.from_h(some_hash) # => #<Cucumber::Messages::TableRow:0x... ...>
Source
# File lib/cucumber/messages/table_row.rb, line 25 def initialize( location: Location.new, cells: [], id: '' ) @location = location @cells = cells @id = id super() end
Calls superclass method