class Cucumber::Messages::Group

Attributes

children[R]
start[R]
value[R]

Public Class Methods

from_h(hash) click to toggle source

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

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

  self.new(
    children: hash[:children]&.map { |item| Group.from_h(item) },
    start: hash[:start],
    value: hash[:value],
  )
end
new( children: [], start: nil, value: nil ) click to toggle source
# File lib/cucumber/messages.dtos.rb, line 1513
def initialize(
  children: [],
  start: nil,
  value: nil
)
  @children = children
  @start = start
  @value = value
end