Class: ChefLicensing::License::Limit
- Inherits:
-
Object
- Object
- ChefLicensing::License::Limit
- Defined in:
- lib/chef-licensing/license.rb
Overview
License has list of limits for different softwares which includes usage details.
Instance Attribute Summary collapse
-
#software ⇒ Object
readonly
Returns the value of attribute software.
-
#usage_limit ⇒ Object
readonly
Returns the value of attribute usage_limit.
-
#usage_measure ⇒ Object
readonly
Returns the value of attribute usage_measure.
-
#usage_status ⇒ Object
readonly
Returns the value of attribute usage_status.
-
#used ⇒ Object
readonly
Returns the value of attribute used.
Instance Method Summary collapse
-
#initialize(limit_data, opts = {}) ⇒ Limit
constructor
A new instance of Limit.
Constructor Details
#initialize(limit_data, opts = {}) ⇒ Limit
Returns a new instance of Limit.
83 84 85 86 87 88 89 |
# File 'lib/chef-licensing/license.rb', line 83 def initialize(limit_data, opts = {}) @usage_status = limit_data["usage_status"] @usage_limit = limit_data["usage_limit"] @usage_measure = limit_data["usage_measure"] @used = limit_data["used"] @software = limit_data["software"] || opts[:product_name] end |
Instance Attribute Details
#software ⇒ Object (readonly)
Returns the value of attribute software.
81 82 83 |
# File 'lib/chef-licensing/license.rb', line 81 def software @software end |
#usage_limit ⇒ Object (readonly)
Returns the value of attribute usage_limit.
81 82 83 |
# File 'lib/chef-licensing/license.rb', line 81 def usage_limit @usage_limit end |
#usage_measure ⇒ Object (readonly)
Returns the value of attribute usage_measure.
81 82 83 |
# File 'lib/chef-licensing/license.rb', line 81 def usage_measure @usage_measure end |
#usage_status ⇒ Object (readonly)
Returns the value of attribute usage_status.
81 82 83 |
# File 'lib/chef-licensing/license.rb', line 81 def usage_status @usage_status end |
#used ⇒ Object (readonly)
Returns the value of attribute used.
81 82 83 |
# File 'lib/chef-licensing/license.rb', line 81 def used @used end |