Sha256: 5e6119342b8dfcbd02387d7a70e7fd6bc74f480757d116e6dfc2dc503303d6ff

Contents?: true

Size: 581 Bytes

Versions: 13

Compression:

Stored size: 581 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.transform == 'Null'
          end
        end

        def apply_to(cursor)
          cursor.reset_position
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/twitter_cldr-4.4.5/lib/twitter_cldr/transforms/transforms/null_transform.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/twitter_cldr-4.4.5/lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.4.5 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.4.4 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.4.3 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.4.2 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.4.1 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.4.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.3.1 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.3.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.2.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.1.0 lib/twitter_cldr/transforms/transforms/null_transform.rb
twitter_cldr-4.0.0 lib/twitter_cldr/transforms/transforms/null_transform.rb