Class: Entitlement::NodesEntry

Inherits:
Entry
  • Object
show all
Defined in:
lib/entitlement/nodes_entry.rb

Overview

Docs

Instance Attribute Summary

Attributes inherited from Entry

#file

Instance Method Summary collapse

Methods inherited from Entry

#days_left, #expiring?, #notify_if_expiring, #purgable?

Constructor Details

#initialize(modules, from, to, filename_string, nodes, &proc) ⇒ NodesEntry

Returns a new instance of NodesEntry.



12
13
14
15
# File 'lib/entitlement/nodes_entry.rb', line 12

def initialize(modules, from, to, filename_string, nodes, &proc)
  super(modules, from, to, filename_string, &proc)
  @nodes = Array[nodes].flatten
end

Instance Method Details

#inspectObject



22
23
24
25
# File 'lib/entitlement/nodes_entry.rb', line 22

def inspect
  super
  puts "For nodes   : #{@nodes.join(',')}"
end

#valid?(module_name, resources = nil) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/entitlement/nodes_entry.rb', line 17

def valid?(module_name, resources = nil)
  Puppet.debug 'Found a node entitlement....'
  super ? valid_node?(current_node) : false
end