Class: Compactor::Amazon::XmlParser
- Defined in:
- lib/compactor/xml_parser.rb
Instance Attribute Summary collapse
-
#calculated_total ⇒ Object
readonly
Returns the value of attribute calculated_total.
-
#expected_total ⇒ Object
readonly
Returns the value of attribute expected_total.
Instance Method Summary collapse
-
#initialize(xml) ⇒ XmlParser
constructor
A new instance of XmlParser.
- #valid? ⇒ Boolean
Constructor Details
Instance Attribute Details
#calculated_total ⇒ Object (readonly)
Returns the value of attribute calculated_total.
4 5 6 |
# File 'lib/compactor/xml_parser.rb', line 4 def calculated_total @calculated_total end |
#expected_total ⇒ Object (readonly)
Returns the value of attribute expected_total.
4 5 6 |
# File 'lib/compactor/xml_parser.rb', line 4 def expected_total @expected_total end |
Instance Method Details
#valid? ⇒ Boolean
9 10 11 |
# File 'lib/compactor/xml_parser.rb', line 9 def valid? (expected_total.abs - calculated_total.abs).abs < 0.009 end |