class Cucumber::Messages::PickleTable
Represents the PickleTable
message in Cucumber’s message protocol.
Attributes
rows[R]
Public Class Methods
from_h(hash)
click to toggle source
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... ...>
# File lib/cucumber/messages/pickle_table.rb, line 27 def self.from_h(hash) return nil if hash.nil? new( rows: hash[:rows]&.map { |item| PickleTableRow.from_h(item) } ) end
new( rows: [] )
click to toggle source
Calls superclass method
# File lib/cucumber/messages/pickle_table.rb, line 13 def initialize( rows: [] ) @rows = rows super() end