Sha256: ab79bc5a49a339587dbf9dad18e23ceb00748e8de6e600ad20609308de9baa0d
Contents?: true
Size: 277 Bytes
Versions: 1
Compression:
Stored size: 277 Bytes
Contents
# -*- encoding : utf-8 -*- module Phrase::Extensions::String extend ActiveSupport::Concern def expand_to_hash(value=nil) self.split('.').reverse.inject(value) do |hash, item| {item => hash} end end end String.send(:include, Phrase::Extensions::String)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
phrase-0.1.3 | lib/phrase/extensions/string.rb |