Class: Mindee::V1::Parsing::Common::Product
- Inherits:
-
Object
- Object
- Mindee::V1::Parsing::Common::Product
- Defined in:
- lib/mindee/v1/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.
17 18 19 20 21 |
# File 'lib/mindee/v1/parsing/common/product.rb', line 17 def initialize(prediction) @name = prediction['name'] @type = prediction['type'] @version = prediction['version'] end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns Name of the product.
10 11 12 |
# File 'lib/mindee/v1/parsing/common/product.rb', line 10 def name @name end |
#type ⇒ String? (readonly)
Returns Type of product.
12 13 14 |
# File 'lib/mindee/v1/parsing/common/product.rb', line 12 def type @type end |
#version ⇒ String (readonly)
Returns Product version.
14 15 16 |
# File 'lib/mindee/v1/parsing/common/product.rb', line 14 def version @version end |