Module: Boxing::Utils
- Included in:
- Generator
- Defined in:
- lib/boxing/utils.rb
Overview
Utility methods
Instance Method Summary collapse
-
#current_path ⇒ String
Get project root.
-
#template(destination, template, context: nil) ⇒ Object
Generate file from template.
Instance Method Details
#current_path ⇒ String
Get project root
15 16 17 18 19 20 |
# File 'lib/boxing/utils.rb', line 15 def current_path return Hanami.app.root if defined?(Hanami) return Rails.root if defined?(Rails) Pathname.new(Dir.pwd) end |