Module: Localeui::Utils
- Defined in:
- lib/localeui/utils.rb
Class Method Summary collapse
Class Method Details
.logger ⇒ Object
8 9 10 |
# File 'lib/localeui/utils.rb', line 8 def logger Logger.new($stdout) end |
.rails_root ⇒ Object
16 17 18 19 20 21 |
# File 'lib/localeui/utils.rb', line 16 def rails_root return ::Rails.root.to_s if defined?(::Rails.root) && ::Rails.root return RAILS_ROOT.to_s if defined?(RAILS_ROOT) nil end |
.root ⇒ Object
12 13 14 |
# File 'lib/localeui/utils.rb', line 12 def root Pathname.new(rails_root || Dir.getwd) end |