Sha256: 5c97d645ef31a4d5807f2639f08e2745c4d3a4625ecb931479cfc45779ad7acf
Contents?: true
Size: 556 Bytes
Versions: 12
Compression:
Stored size: 556 Bytes
Contents
module Onering module Util module String def nil_empty return nil if (self.strip.chomp.empty? rescue true) self.strip.chomp end end def self.gem_path(name) if Gem::Specification.respond_to?(:find_by_name) return Gem::Specification.find_by_name(name).gem_dir else return Gem::SourceIndex.from_installed_gems.find_name(name).sort{|a,b| a.version.to_s <=> b.version.to_s }.last.full_gem_path end end end end class String include Onering::Util::String end
Version data entries
12 entries across 12 versions & 1 rubygems