Class: Errata::Erratum::Truncate
- Inherits:
-
Errata::Erratum
- Object
- Errata::Erratum
- Errata::Erratum::Truncate
- Defined in:
- lib/errata/erratum/truncate.rb
Constant Summary
Constants inherited from Errata::Erratum
REJECT_ACTIONS, SEMICOLON_DELIMITER, SPECIAL_ABBR
Instance Attribute Summary collapse
-
#necessary_and_sufficient_prefix ⇒ Object
readonly
Returns the value of attribute necessary_and_sufficient_prefix.
Attributes inherited from Errata::Erratum
#matching_expression, #matching_methods, #responder, #section
Instance Method Summary collapse
- #correct!(row) ⇒ Object
-
#initialize(responder, options = {}) ⇒ Truncate
constructor
A new instance of Truncate.
Methods inherited from Errata::Erratum
#abbr?, #conditions_match?, #expression_matches?, #targets?
Constructor Details
#initialize(responder, options = {}) ⇒ Truncate
Returns a new instance of Truncate.
6 7 8 9 |
# File 'lib/errata/erratum/truncate.rb', line 6 def initialize(responder, = {}) super @necessary_and_sufficient_prefix = [:x] end |
Instance Attribute Details
#necessary_and_sufficient_prefix ⇒ Object (readonly)
Returns the value of attribute necessary_and_sufficient_prefix.
4 5 6 |
# File 'lib/errata/erratum/truncate.rb', line 4 def necessary_and_sufficient_prefix @necessary_and_sufficient_prefix end |
Instance Method Details
#correct!(row) ⇒ Object
11 12 13 14 15 |
# File 'lib/errata/erratum/truncate.rb', line 11 def correct!(row) if targets? row row[section] = necessary_and_sufficient_prefix.dup end end |