Sha256: 1ab93417d33587ccd13c15e7f5c56475871801311a6c6dbccf92fcaa2af39bf2

Contents?: true

Size: 741 Bytes

Versions: 17

Compression:

Stored size: 741 Bytes

Contents

class Errata
  class Erratum
    class Truncate < Erratum
      attr_accessor :matching_expression, :necessary_and_sufficient_prefix
      
      def initialize(errata, options = {})
        super
        @necessary_and_sufficient_prefix = options[:x]
        raise "necessary_and_sufficient_prefix cannot be blank" if @necessary_and_sufficient_prefix.blank?
        set_matching_expression(options.merge(:prefix => true))
      end

      def inspect
        super + " matching_expression=#{matching_expression} necessary_and_sufficient_prefix=#{necessary_and_sufficient_prefix}>"
      end
      
      def correct!(row)
        super(row) do
          row[column] = necessary_and_sufficient_prefix
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
seamusabshere-errata-0.1.0 lib/erratum/truncate.rb
seamusabshere-errata-0.1.1 lib/erratum/truncate.rb
seamusabshere-errata-0.1.2 lib/erratum/truncate.rb
seamusabshere-errata-0.1.3 lib/erratum/truncate.rb
seamusabshere-errata-0.1.4 lib/erratum/truncate.rb
errata-0.2.4 lib/erratum/truncate.rb
errata-ruby19-0.2.3 lib/erratum/truncate.rb
errata-0.2.3 lib/erratum/truncate.rb
errata-0.2.2 lib/erratum/truncate.rb
errata-0.2.1 lib/erratum/truncate.rb
errata-0.2.0 lib/erratum/truncate.rb
errata-0.1.9 lib/erratum/truncate.rb
errata-0.1.8 lib/erratum/truncate.rb
errata-0.1.7 lib/erratum/truncate.rb
errata-0.1.6 lib/erratum/truncate.rb
errata-0.1.5 lib/erratum/truncate.rb
errata-0.1.4 lib/erratum/truncate.rb