Class: DTK::Client::Violation::InvalidCredentials
- Inherits:
-
DTK::Client::Violation
- Object
- DTK::Client::Violation
- DTK::Client::Violation::InvalidCredentials
- Defined in:
- lib/violation/sub_classes.rb
Instance Method Summary collapse
- #get_input_and_apply_fix ⇒ Object
-
#initialize(service_id, violation_hash) ⇒ InvalidCredentials
constructor
A new instance of InvalidCredentials.
Methods inherited from DTK::Client::Violation
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_fix ⇒ Object
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 |