Class: AbideDevUtils::XCCDF::Diff::ProfileRuleContainer

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/abide_dev_utils/xccdf/diff/benchmark/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(profile, prop_checker = nil) ⇒ ProfileRuleContainer

Returns a new instance of ProfileRuleContainer.



92
93
94
95
96
# File 'lib/abide_dev_utils/xccdf/diff/benchmark/profile.rb', line 92

def initialize(profile, prop_checker = nil)
  @profile = profile
  @rules = profile.linked_rule
  @prop_checker = prop_checker
end

Instance Attribute Details

#profileObject (readonly)

Returns the value of attribute profile.



90
91
92
# File 'lib/abide_dev_utils/xccdf/diff/benchmark/profile.rb', line 90

def profile
  @profile
end

#prop_checkerObject

Returns the value of attribute prop_checker.



89
90
91
# File 'lib/abide_dev_utils/xccdf/diff/benchmark/profile.rb', line 89

def prop_checker
  @prop_checker
end

#rulesObject (readonly)

Returns the value of attribute rules.



90
91
92
# File 'lib/abide_dev_utils/xccdf/diff/benchmark/profile.rb', line 90

def rules
  @rules
end

Instance Method Details

#<=>(other) ⇒ Object



98
99
100
# File 'lib/abide_dev_utils/xccdf/diff/benchmark/profile.rb', line 98

def <=>(other)
  @profile.id <=> other.profile.id
end