Class: Entitlement::SizedEntry
- Defined in:
- lib/entitlement/sized_entry.rb
Overview
Docs
Instance Attribute Summary
Attributes inherited from Entry
Instance Method Summary collapse
-
#initialize(modules, from, to, filename_string, size, &proc) ⇒ SizedEntry
constructor
A new instance of SizedEntry.
- #inspect ⇒ Object
- #valid?(module_name, resources = nil) ⇒ Boolean
Methods inherited from Entry
#days_left, #expiring?, #notify_if_expiring, #purgable?
Constructor Details
#initialize(modules, from, to, filename_string, size, &proc) ⇒ SizedEntry
Returns a new instance of SizedEntry.
12 13 14 15 |
# File 'lib/entitlement/sized_entry.rb', line 12 def initialize(modules, from, to, filename_string, size, &proc) super(modules, from, to, filename_string, &proc) @size = size end |
Instance Method Details
#inspect ⇒ Object
23 24 25 26 |
# File 'lib/entitlement/sized_entry.rb', line 23 def inspect super puts "# of entries: #{@size}" end |
#valid?(module_name, resources = nil) ⇒ Boolean
17 18 19 20 21 |
# File 'lib/entitlement/sized_entry.rb', line 17 def valid?(module_name, resources = nil) Puppet.debug 'Found a sized entitlement....' size = resources ? resources.size : nil super ? valid_number_of_entries?(size) : false end |