Class: Errata
- Inherits:
-
Object
- Object
- Errata
- Defined in:
- lib/errata.rb,
lib/erratum.rb,
lib/erratum/delete.rb,
lib/erratum/reject.rb,
lib/erratum/replace.rb,
lib/erratum/simplify.rb,
lib/erratum/truncate.rb,
lib/erratum/transform.rb
Defined Under Namespace
Classes: Erratum
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #correct!(row) ⇒ Object
- #implied_matching_methods ⇒ Object
-
#initialize(options = {}) ⇒ Errata
constructor
A new instance of Errata.
- #rejects?(row) ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Errata
Returns a new instance of Errata.
15 16 17 18 |
# File 'lib/errata.rb', line 15 def initialize( = {}) @klass = [:klass] @_table = RemoteTable.new(:url => [:url]) end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
13 14 15 |
# File 'lib/errata.rb', line 13 def klass @klass end |
Instance Method Details
#correct!(row) ⇒ Object
24 25 26 27 |
# File 'lib/errata.rb', line 24 def correct!(row) corrections.each { |erratum| erratum.correct!(row) } nil end |
#implied_matching_methods ⇒ Object
29 30 31 |
# File 'lib/errata.rb', line 29 def implied_matching_methods (rejections + corrections).map { |erratum| erratum.matching_method }.compact.uniq end |
#rejects?(row) ⇒ Boolean
20 21 22 |
# File 'lib/errata.rb', line 20 def rejects?(row) rejections.any? { |erratum| erratum.targets?(row) } end |