Class: ChefLicensing::License::Limit

Inherits:
Object
  • Object
show all
Defined in:
lib/chef-licensing/license.rb

Overview

License has list of limits for different softwares which includes usage details.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limit_data, opts = {}) ⇒ Limit



79
80
81
82
83
84
85
# File 'lib/chef-licensing/license.rb', line 79

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

#softwareObject (readonly)

Returns the value of attribute software.



77
78
79
# File 'lib/chef-licensing/license.rb', line 77

def software
  @software
end

#usage_limitObject (readonly)

Returns the value of attribute usage_limit.



77
78
79
# File 'lib/chef-licensing/license.rb', line 77

def usage_limit
  @usage_limit
end

#usage_measureObject (readonly)

Returns the value of attribute usage_measure.



77
78
79
# File 'lib/chef-licensing/license.rb', line 77

def usage_measure
  @usage_measure
end

#usage_statusObject (readonly)

Returns the value of attribute usage_status.



77
78
79
# File 'lib/chef-licensing/license.rb', line 77

def usage_status
  @usage_status
end

#usedObject (readonly)

Returns the value of attribute used.



77
78
79
# File 'lib/chef-licensing/license.rb', line 77

def used
  @used
end