Module: Lam::Util
- Included in:
- Lam
- Defined in:
- lib/lam/util.rb
Constant Summary collapse
- @@root =
Ensures trailing slash Useful for appending a ‘./’ in front of a path or leaving it alone. Returns: ‘/path/with/trailing/slash/’ or ‘./’
nil
Instance Method Summary collapse
Instance Method Details
#root ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/lam/util.rb', line 6 def root return @@root if @@root @@root = ENV['PROJECT_ROOT'].to_s @@root = '.' if @@root == '' @@root = "#{@@root}/" unless @@root.ends_with?('/') @@root end |