module CW::TextHelpers

Public Instance Methods

cw_chars(chr) click to toggle source
# File lib/cw/text_helpers.rb, line 14
def cw_chars chr
  chr.tr('^a-z0-9\.\,+', '')
end
exclude_non_cw_chars(word) click to toggle source
# File lib/cw/text_helpers.rb, line 18
def exclude_non_cw_chars word
  temp = ''
  word.split.each do |chr|
    temp += chr if letter(chr)
  end
  temp
end
letter_group() click to toggle source
# File lib/cw/text_helpers.rb, line 6
def letter_group
  (97..122).collect {|e| e.chr}
end
number_group() click to toggle source
# File lib/cw/text_helpers.rb, line 10
def number_group
  (48..57).collect {|e| e.chr}
end