Sha256: c58ed9917e160fd3b49f36c7bae15007a8b8ce00973a68e102c30f31ca3676c1
Contents?: true
Size: 367 Bytes
Versions: 3
Compression:
Stored size: 367 Bytes
Contents
module Lam::Util # Ensures trailing slash # Useful for appending a './' in front of a path or leaving it alone. # Returns: '/path/with/trailing/slash/' or './' @@root = nil def root return @@root if @@root @@root = ENV['PROJECT_ROOT'].to_s @@root = '.' if @@root == '' @@root = "#{@@root}/" unless @@root.ends_with?('/') @@root end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lam-0.1.2 | lib/lam/util.rb |
lam-0.1.1 | lib/lam/util.rb |
lam-0.0.1 | lib/lam/util.rb |