Sha256: b0bd250b8acb3d766bd118d186544eb4348b74236381496dbea24f4cea7b0f80
Contents?: true
Size: 632 Bytes
Versions: 1
Compression:
Stored size: 632 Bytes
Contents
module TwitterCldr module Tokenizers class KeyPath class << self def dirname(path) self.join_path(self.split_path(path)[0..-2]) end def join(*args) final = "" args.each do |arg| fixed_arg = arg.chomp(".") fixed_arg = arg[1..-1] if fixed_arg[0].chr == "." final << "." if final.size > 0 final << fixed_arg end final end def split_path(path) path.split(/\./) end def join_path(path_arr) path_arr.join(".") end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
twitter_cldr-1.0.0 | lib/tokenizers/key_path.rb |