Class: Susanoo::Controller
- Inherits:
-
Object
- Object
- Susanoo::Controller
- Includes:
- Sprockets::Helpers
- Defined in:
- lib/susanoo/controller.rb
Direct Known Subclasses
Application::Assets, Application::Index, Application::Static, Application::Views
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#project_root ⇒ Object
Returns the value of attribute project_root.
Instance Method Summary collapse
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
- #static_compile? ⇒ Boolean
Constructor Details
#initialize ⇒ Controller
Returns a new instance of Controller.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/susanoo/controller.rb', line 13 def initialize @project_root = Susanoo::Project.path @environment = Sprockets::Environment.new(@project_root) do |env| env.logger = Logger.new(STDOUT) end #@environment.append_path(@project_root) @environment.append_path(File.join(@project_root, 'src', 'assets')) @environment.append_path(File.join(@project_root, 'src', 'assets', 'javascripts')) @environment.append_path(File.join(@project_root, 'src', 'assets', 'stylesheets')) @environment.append_path(File.join(@project_root, 'src', 'assets', 'images')) @environment.append_path(File.join(@project_root, 'src', 'assets', 'fonts')) Susanoo::StaticGenerator.register self.class end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
10 11 12 |
# File 'lib/susanoo/controller.rb', line 10 def debug @debug end |
#environment ⇒ Object
Returns the value of attribute environment.
9 10 11 |
# File 'lib/susanoo/controller.rb', line 9 def environment @environment end |
#project_root ⇒ Object
Returns the value of attribute project_root.
11 12 13 |
# File 'lib/susanoo/controller.rb', line 11 def project_root @project_root end |
Instance Method Details
#static_compile? ⇒ Boolean
30 31 32 |
# File 'lib/susanoo/controller.rb', line 30 def static_compile? @static_compile end |