class Cucumber::Messages::Product
Represents the Product message in Cucumberโs message protocol.
Used to describe various properties of Meta
Attributes
The product name
The product version
Public Class Methods
Source
# 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
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... ...>
Source
# File lib/cucumber/messages/product.rb, line 23 def initialize( name: '', version: nil ) @name = name @version = version super() end
Calls superclass method