Class: Milktea::Config
- Inherits:
-
Object
- Object
- Milktea::Config
- Defined in:
- lib/milktea/config.rb
Overview
Configuration class for Milktea applications
Instance Attribute Summary collapse
-
#autoload_dirs ⇒ Object
Returns the value of attribute autoload_dirs.
-
#hot_reloading ⇒ Object
writeonly
Sets the attribute hot_reloading.
-
#output ⇒ Object
Returns the value of attribute output.
- #renderer ⇒ Object
- #runtime ⇒ Object
Instance Method Summary collapse
- #autoload_paths ⇒ Object
- #hot_reloading? ⇒ Boolean
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 14 15 16 17 |
# File 'lib/milktea/config.rb', line 9 def initialize @autoload_dirs = ["app/models"] @output = $stdout @hot_reloading = nil # Will be set by lazy evaluation @runtime = nil # Will be set by lazy evaluation @renderer = nil # Will be set by lazy evaluation yield(self) if block_given? end |
Instance Attribute Details
#autoload_dirs ⇒ Object
Returns the value of attribute autoload_dirs.
6 7 8 |
# File 'lib/milktea/config.rb', line 6 def autoload_dirs @autoload_dirs end |
#hot_reloading=(value) ⇒ Object (writeonly)
Sets the attribute hot_reloading
7 8 9 |
# File 'lib/milktea/config.rb', line 7 def hot_reloading=(value) @hot_reloading = value end |
#output ⇒ Object
Returns the value of attribute output.
6 7 8 |
# File 'lib/milktea/config.rb', line 6 def output @output end |