Class: Cucumber::Messages::Product
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb
Overview
Represents the Product message in Cucumber’s message protocol.
Used to describe various properties of Meta
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The product name.
-
#version ⇒ Object
readonly
The product version.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Product from the given hash.
Instance Method Summary collapse
-
#initialize(name: '', version: nil) ⇒ Product
constructor
A new instance of Product.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(name: '', version: nil) ⇒ Product
Returns a new instance of Product.
984 985 986 987 988 989 990 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 984 def initialize( name: '', version: nil ) @name = name @version = version end |
Instance Attribute Details
#name ⇒ Object (readonly)
The product name
977 978 979 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 977 def name @name end |
#version ⇒ Object (readonly)
The product version
982 983 984 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 982 def version @version end |
Class Method Details
.from_h(hash) ⇒ Object
547 548 549 550 551 552 553 554 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 547 def self.from_h(hash) return nil if hash.nil? self.new( name: hash[:name], version: hash[:version], ) end |