Class: Mindee::Parsing::Common::Product
- Inherits:
-
Object
- Object
- Mindee::Parsing::Common::Product
- Defined in:
- lib/mindee/parsing/common/product.rb
Overview
Product information
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Name of the product.
-
#type ⇒ String?
readonly
Type of product.
-
#version ⇒ String
readonly
Product version.
Instance Method Summary collapse
-
#initialize(prediction) ⇒ Product
constructor
A new instance of Product.
Constructor Details
#initialize(prediction) ⇒ Product
Returns a new instance of Product.
16 17 18 19 20 |
# File 'lib/mindee/parsing/common/product.rb', line 16 def initialize(prediction) @name = prediction['name'] @type = prediction['type'] @version = prediction['version'] end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns Name of the product.
9 10 11 |
# File 'lib/mindee/parsing/common/product.rb', line 9 def name @name end |
#type ⇒ String? (readonly)
Returns Type of product.
11 12 13 |
# File 'lib/mindee/parsing/common/product.rb', line 11 def type @type end |
#version ⇒ String (readonly)
Returns Product version.
13 14 15 |
# File 'lib/mindee/parsing/common/product.rb', line 13 def version @version end |