Sha256: 143b0964dc3de6ad6bd0a26deb787cd4df91eb630900089687311294022b2350
Contents?: true
Size: 294 Bytes
Versions: 8
Compression:
Stored size: 294 Bytes
Contents
module SmallCage module LangHelper def lang return @obj["lang"] unless @obj["lang"].nil? if @obj["uri"] =~ %r{^/(ja|en)/} return $1 end return nil end def switch_lang(code) @obj["uri"].gsub(%r{^/(en|ja)/}, "/#{code}/") end end end
Version data entries
8 entries across 8 versions & 1 rubygems