class Cucumber::Messages::TableCell

Represents the TableCell message in Cucumber’s message protocol.

A cell in a ‘TableRow`

Attributes

location[R]

The location of the cell

value[R]

The value of the cell

Public Class Methods

from_h(hash) click to toggle source

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

Cucumber::Messages::TableCell.from_h(some_hash) # => #<Cucumber::Messages::TableCell:0x... ...>
# File lib/cucumber/messages/table_cell.rb, line 39
def self.from_h(hash)
  return nil if hash.nil?

  new(
    location: Location.from_h(hash[:location]),
    value: hash[:value]
  )
end
new( location: Location.new, value: '' ) click to toggle source
Calls superclass method
# File lib/cucumber/messages/table_cell.rb, line 23
def initialize(
  location: Location.new,
  value: ''
)
  @location = location
  @value = value
  super()
end