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)


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

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end