Sha256: c4943e686b8a06203823a8eec3af0766c600671e4d3c298d56e0754bcafaeb01
Contents?: true
Size: 723 Bytes
Versions: 17
Compression:
Stored size: 723 Bytes
Contents
class Errata class Erratum class Replace < Erratum attr_accessor :matching_expression, :correction def initialize(errata, options = {}) super set_matching_expression(options) @correction = /\Aabbr\((.*)\)\z/.match(options[:x]) ? '\1' + options[:y].to_s + '\2' : options[:y].to_s end def inspect super + " matching_expression=#{matching_expression} correction=#{correction}>" end def correct!(row) super(row) do if matching_expression.blank? row[column] = correction else row[column].gsub!(matching_expression, correction) end end end end end end
Version data entries
17 entries across 17 versions & 3 rubygems