Class: Rage::Configuration::CodeLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/rage/configuration.rb

Instance Attribute Summary collapse

Instance Attribute Details

#reload_paths=(paths) ⇒ Object

Specify additional paths to watch for changes in development.

Examples:

Watch HAML templates

Rage.configure do
  config.code_loader.reload_paths = ["app/views/**/*.haml"]
end

Parameters:

  • paths (Array<Pathname, String>)

    glob patterns or directory paths to watch



1183
1184
1185
1186
1187
# File 'lib/rage/configuration.rb', line 1183

def reload_paths=(paths)
  @reload_paths = Array(paths).map do |path|
    path.is_a?(Pathname) ? path : Pathname.new(path)
  end
end