Sha256: d315e0595bebb7e8f67b24841c06240df5f8b3b4c9a1355b753487175c2764a2

Contents?: true

Size: 418 Bytes

Versions: 14

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

require 'stepmod/utils/converters/em'

module Stepmod
  module Utils
    module Converters
      class Stem < ReverseAdoc::Converters::Base
        def convert(node, state = {})
          return Em.new.convert(node, state) if node.text.strip.length > 8

          " stem:[#{node.text.strip}] "
        end
      end

      ReverseAdoc::Converters.register :i, Stem.new
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
stepmod-utils-0.3.5 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.3.4 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.3.2 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.3.1 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.3.0 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.2.7 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.2.6 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.2.5 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.2.4 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.2.3 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.2.0 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.8 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.7 lib/stepmod/utils/converters/stem.rb
stepmod-utils-0.1.6 lib/stepmod/utils/converters/stem.rb