class Object

Public Instance Methods

failed?() click to toggle source

Return false if the subject’s attribute is equal to the expectation, true otherwise.

# File lib/puppet/provider/assertion/evaluator.rb, line 27
def failed?
  @resource[:expectation] != @resource[:subject][@resource[:attribute]]
end
got() click to toggle source

Returns a hash containing the assertion’s attribute as the single key, with the value of the subject’s attribute. Used for rendering the results to the console.

# File lib/puppet/provider/assertion/evaluator.rb, line 21
def got
  { @resource[:attribute] => @resource[:subject][@resource[:attribute]] }
end
relative_path() click to toggle source

Returns the complete path to the subject’s manifest after /manifests

# File lib/puppet/provider/assertion/evaluator.rb, line 5
def relative_path
  @resource[:subject].file.split('manifests/').last
end
retrieve() click to toggle source

Stub out the retrieve method since the Puppet internals require any param named ensure to have it. Grr.

# File lib/puppet/type/assertion.rb, line 55
def retrieve
end
wanted() click to toggle source

Returns a hash containing the assertion’s attribute as the single key, with the value of the expectation. Used for rendering the results to the console.

# File lib/puppet/provider/assertion/evaluator.rb, line 13
def wanted
  { @resource[:attribute] => @resource[:expectation] }
end