Class: RSX::Configuration
- Inherits:
-
Object
- Object
- RSX::Configuration
- Defined in:
- lib/rsx.rb
Overview
Configuration is intentionally small: where to find components, where to put compiled output, and which cache to use.
Instance Attribute Summary collapse
-
#cache_dir ⇒ Object
Where compiled Ruby is cached.
- #cache_store ⇒ Object
-
#component_namespace ⇒ Object
Namespace that
component Nameconstants are defined under. -
#paths ⇒ Object
Directories searched for .rsx files and imports.
-
#reload ⇒ Object
Reload changed .rsx files automatically (development).
Instance Method Summary collapse
- #compile_cache ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
54 55 56 57 58 59 |
# File 'lib/rsx.rb', line 54 def initialize @paths = [] @component_namespace = Object @reload = false self.cache_dir = default_cache_dir end |
Instance Attribute Details
#cache_dir ⇒ Object
Where compiled Ruby is cached. Set to nil to compile in memory only.
43 44 45 |
# File 'lib/rsx.rb', line 43 def cache_dir @cache_dir end |
#cache_store ⇒ Object
70 71 72 |
# File 'lib/rsx.rb', line 70 def cache_store @cache_store ||= Cache::Memory.new end |
#component_namespace ⇒ Object
Namespace that component Name constants are defined under.
49 50 51 |
# File 'lib/rsx.rb', line 49 def component_namespace @component_namespace end |
#paths ⇒ Object
Directories searched for .rsx files and imports.
40 41 42 |
# File 'lib/rsx.rb', line 40 def paths @paths end |
#reload ⇒ Object
Reload changed .rsx files automatically (development).
52 53 54 |
# File 'lib/rsx.rb', line 52 def reload @reload end |
Instance Method Details
#compile_cache ⇒ Object
66 67 68 |
# File 'lib/rsx.rb', line 66 def compile_cache @compile_cache ||= CompileCache.new(@cache_dir) end |