Class: LicenseAcceptance::Product
- Inherits:
-
Object
- Object
- LicenseAcceptance::Product
- Defined in:
- lib/license_acceptance/product.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#license_required_version ⇒ Object
readonly
Returns the value of attribute license_required_version.
-
#mixlib_name ⇒ Object
readonly
Returns the value of attribute mixlib_name.
-
#pretty_name ⇒ Object
readonly
Returns the value of attribute pretty_name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id, pretty_name, filename, mixlib_name, license_required_version) ⇒ Product
constructor
A new instance of Product.
Constructor Details
#initialize(id, pretty_name, filename, mixlib_name, license_required_version) ⇒ Product
Returns a new instance of Product.
6 7 8 9 10 11 12 13 |
# File 'lib/license_acceptance/product.rb', line 6 def initialize(id, pretty_name, filename, mixlib_name, license_required_version) # id is the internal representation of this product as license-acceptance knows it @id = id @pretty_name = pretty_name @filename = filename @mixlib_name = mixlib_name @license_required_version = license_required_version end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
4 5 6 |
# File 'lib/license_acceptance/product.rb', line 4 def filename @filename end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/license_acceptance/product.rb', line 4 def id @id end |
#license_required_version ⇒ Object (readonly)
Returns the value of attribute license_required_version.
4 5 6 |
# File 'lib/license_acceptance/product.rb', line 4 def license_required_version @license_required_version end |
#mixlib_name ⇒ Object (readonly)
Returns the value of attribute mixlib_name.
4 5 6 |
# File 'lib/license_acceptance/product.rb', line 4 def mixlib_name @mixlib_name end |
#pretty_name ⇒ Object (readonly)
Returns the value of attribute pretty_name.
4 5 6 |
# File 'lib/license_acceptance/product.rb', line 4 def pretty_name @pretty_name end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/license_acceptance/product.rb', line 15 def ==(other) return false if other.class != Product if other.id == id && other.pretty_name == pretty_name && other.filename == filename && other.mixlib_name == mixlib_name other.license_required_version == license_required_version return true end return false end |