class Cucumber::Messages::Group
Represents the Group
message in Cucumber’s message protocol.
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/group.rb, line 35 def self.from_h(hash) return nil if hash.nil? 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
Calls superclass method
# File lib/cucumber/messages/group.rb, line 17 def initialize( children: [], start: nil, value: nil ) @children = children @start = start @value = value super() end