class Cucumber::Messages::Product

Represents the Product message in Cucumber’s message protocol.

Used to describe various properties of Meta

Attributes

name[R]

The product name

version[R]

The product version

Public Class Methods

from_h(hash) click to toggle source

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

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

  new(
    name: hash[:name],
    version: hash[:version]
  )
end
new( name: '', version: nil ) click to toggle source
Calls superclass method
# File lib/cucumber/messages/product.rb, line 23
def initialize(
  name: '',
  version: nil
)
  @name = name
  @version = version
  super()
end