Class: Mindee::V1::Parsing::Common::Product

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/v1/parsing/common/product.rb

Overview

Product information

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prediction) ⇒ Product

Returns a new instance of Product.

Parameters:

  • prediction (Hash)


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

#nameString (readonly)

Returns Name of the product.

Returns:

  • (String)

    Name of the product.



10
11
12
# File 'lib/mindee/v1/parsing/common/product.rb', line 10

def name
  @name
end

#typeString? (readonly)

Returns Type of product.

Returns:

  • (String?)

    Type of product.



12
13
14
# File 'lib/mindee/v1/parsing/common/product.rb', line 12

def type
  @type
end

#versionString (readonly)

Returns Product version.

Returns:

  • (String)

    Product version.



14
15
16
# File 'lib/mindee/v1/parsing/common/product.rb', line 14

def version
  @version
end