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

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

#softwareObject (readonly)

Returns the value of attribute software.



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

def software
  @software
end

#usage_limitObject (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_measureObject (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_statusObject (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

#usedObject (readonly)

Returns the value of attribute used.



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

def used
  @used
end