class Cucumber::Messages::Group
Represents the Group message in Cucumberโs message protocol.
Attributes
The nested capture groups of an argument. Absent if the group has no nested capture groups.
Public Class Methods
Source
# File lib/cucumber/messages/group.rb, line 39 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
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... ...>
Source
# File lib/cucumber/messages/group.rb, line 21 def initialize( children: nil, start: nil, value: nil ) @children = children @start = start @value = value super() end
Calls superclass method