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

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/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)


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

#nameString (readonly)

Returns Name of the product.

Returns:

  • (String)

    Name of the product.



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

def name
  @name
end

#typeString? (readonly)

Returns Type of product.

Returns:

  • (String?)

    Type of product.



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

def type
  @type
end

#versionString (readonly)

Returns Product version.

Returns:

  • (String)

    Product version.



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

def version
  @version
end