Sha256: e5567671252c008bd597b35348f9f8877c4b4953ddfa0e0f847d2a159a2245cd

Contents?: true

Size: 684 Bytes

Versions: 29

Compression:

Stored size: 684 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Transforms
    module Transforms

      class NullTransform < TransformRule
        class << self
          def accepts?(forward_form, backward_form)
            valid_form?(forward_form) || valid_form?(backward_form)
          end

          private

          def valid_form?(form)
            form && (form.null? || form.transform.downcase == 'null')
          end
        end

        def apply_to(cursor)
          puts 'NULL' if $debug
          cursor.reset_position
        end

        def null?
          true
        end
      end

    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
twitter_cldr-6.13.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.12.1 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.12.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.11.5 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.11.4 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.11.3 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.11.2 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.11.1 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.11.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.10.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.9.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.8.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.7.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.6.2 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.6.1 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.6.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.5.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.4.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.3.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-6.2.0 lib/twitter_cldr/transforms/transforms/null_transform.rb