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 ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute 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.
11 12 13 14 15 |
# File 'lib/mindee/parsing/common/product.rb', line 11 def initialize(prediction) @name = prediction['name'] @type = prediction['type'] @version = prediction['version'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/mindee/parsing/common/product.rb', line 8 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/mindee/parsing/common/product.rb', line 8 def type @type end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/mindee/parsing/common/product.rb', line 8 def version @version end |