Sha256: 050dddf7ff27d5769ca64e799d9d04c9de8961e08f3048134be9c843243ca033

Contents?: true

Size: 328 Bytes

Versions: 2

Compression:

Stored size: 328 Bytes

Contents

module Kana
  class Estimator
    class String
      class << self
        def to_kana(text)
          text.tr('ぁ-ん', 'ァ-ン')
        end

        def kana?(text)
          text.match?(/^[ァ-ン]+$/)
        end

        def include_kana?(text)
          text.match?(/[ァ-ン]/)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kana-estimator-0.1.1 lib/kana/estimator/string.rb
kana-estimator-0.1.0 lib/kana/estimator/string.rb