Class: Errata::Erratum::Truncate

Inherits:
Errata::Erratum show all
Defined in:
lib/errata/erratum/truncate.rb

Instance Attribute Summary

Attributes inherited from Errata::Erratum

#errata, #options

Instance Method Summary collapse

Methods inherited from Errata::Erratum

#conditions_match?, #expression_matches?, #initialize, #matching_expression, #matching_methods, #responder, #section, #targets?

Constructor Details

This class inherits a constructor from Errata::Erratum

Instance Method Details

#correct!(row) ⇒ Object


8
9
10
11
12
# File 'lib/errata/erratum/truncate.rb', line 8

def correct!(row)
  if targets? row
    row[section] = necessary_and_sufficient_prefix.dup
  end
end

#necessary_and_sufficient_prefixObject


4
5
6
# File 'lib/errata/erratum/truncate.rb', line 4

def necessary_and_sufficient_prefix
  options['x']
end