Class: DTK::Client::Violation::InvalidCredentials

Inherits:
DTK::Client::Violation show all
Defined in:
lib/violation/sub_classes.rb

Instance Method Summary collapse

Methods inherited from DTK::Client::Violation

fix_violations

Constructor Details

#initialize(service_id, violation_hash) ⇒ InvalidCredentials

Returns a new instance of InvalidCredentials.



44
45
46
47
# File 'lib/violation/sub_classes.rb', line 44

def initialize(service_id, violation_hash)
  super
  @attributes = violation_hash['fix_hashes'].map { |hash|  Attribute.new(hash['attribute']) } 
end

Instance Method Details

#get_input_and_apply_fixObject



49
50
51
52
53
54
55
56
# File 'lib/violation/sub_classes.rb', line 49

def get_input_and_apply_fix
  result = nil
  @attributes.each do |attribute| 
    result = Fix::SetAttribute.get_input_and_apply_fix(@service_id, attribute)
    return result if result.skip_all? or result.error?
  end
  result.ok? ? Fix::Result.rerun_violation_check : result
end