Class: Bijou::Config
- Inherits:
-
Object
- Object
- Bijou::Config
- Defined in:
- lib/bijou/config.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#cache_ext ⇒ Object
Returns the value of attribute cache_ext.
-
#cache_root ⇒ Object
Returns the value of attribute cache_root.
-
#component_base ⇒ Object
Returns the value of attribute component_base.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#document_root ⇒ Object
Returns the value of attribute document_root.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#includes ⇒ Object
Returns the value of attribute includes.
-
#require_list ⇒ Object
Returns the value of attribute require_list.
-
#trace_buffer ⇒ Object
Returns the value of attribute trace_buffer.
-
#trace_level ⇒ Object
Returns the value of attribute trace_level.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/bijou/config.rb', line 17 def initialize @file_path = nil @document_root = nil @cache_root = nil @cache_ext = '.obj' @includes = [] @component_base = nil @require_list = nil @cache = true @debug = false @trace_level = Bijou::Log::None @trace_buffer = true end |
Instance Attribute Details
#cache ⇒ Object
Returns the value of attribute cache.
44 45 46 |
# File 'lib/bijou/config.rb', line 44 def cache @cache end |
#cache_ext ⇒ Object
Returns the value of attribute cache_ext.
38 39 40 |
# File 'lib/bijou/config.rb', line 38 def cache_ext @cache_ext end |
#cache_root ⇒ Object
Returns the value of attribute cache_root.
37 38 39 |
# File 'lib/bijou/config.rb', line 37 def cache_root @cache_root end |
#component_base ⇒ Object
Returns the value of attribute component_base.
41 42 43 |
# File 'lib/bijou/config.rb', line 41 def component_base @component_base end |
#debug ⇒ Object
Returns the value of attribute debug.
45 46 47 |
# File 'lib/bijou/config.rb', line 45 def debug @debug end |
#document_root ⇒ Object
Returns the value of attribute document_root.
36 37 38 |
# File 'lib/bijou/config.rb', line 36 def document_root @document_root end |
#file_path ⇒ Object
Returns the value of attribute file_path.
34 35 36 |
# File 'lib/bijou/config.rb', line 34 def file_path @file_path end |
#includes ⇒ Object
Returns the value of attribute includes.
39 40 41 |
# File 'lib/bijou/config.rb', line 39 def includes @includes end |
#require_list ⇒ Object
Returns the value of attribute require_list.
42 43 44 |
# File 'lib/bijou/config.rb', line 42 def require_list @require_list end |
#trace_buffer ⇒ Object
Returns the value of attribute trace_buffer.
47 48 49 |
# File 'lib/bijou/config.rb', line 47 def trace_buffer @trace_buffer end |
#trace_level ⇒ Object
Returns the value of attribute trace_level.
46 47 48 |
# File 'lib/bijou/config.rb', line 46 def trace_level @trace_level end |
Class Method Details
.load_file(file_path) ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/bijou/config.rb', line 49 def self.load_file(file_path) if file_path && !file_path.empty? f = File.open(file_path, "r") cfg = new cfg.instance_eval(f.read(), file_path) cfg.file_path = file_path return cfg end nil end |