Method: Padrino.root

Defined in:
padrino-core/lib/padrino-core.rb

.root(*args) ⇒ String

Helper method for file references.

Examples:

# Referencing a file in config called settings.yml
Padrino.root("config", "settings.yml")
# returns PADRINO_ROOT + "/config/setting.yml"

Parameters:

Returns:

  • (String)

    The absolute path.



48
49
50
# File 'padrino-core/lib/padrino-core.rb', line 48

def root(*args)
  File.expand_path(File.join(PADRINO_ROOT, *args))
end