Class: Matt::Configuration
- Inherits:
-
Object
- Object
- Matt::Configuration
- Defined in:
- lib/matt/configuration.rb
Constant Summary collapse
- DEBUG_SILENT =
0- DEBUG_INFO =
1- DEBUG_VERBOSE =
2
Instance Attribute Summary collapse
-
#at_predicate ⇒ Object
Returns the value of attribute at_predicate.
-
#csv_options ⇒ Object
Returns the value of attribute csv_options.
-
#debug_level ⇒ Object
Returns the value of attribute debug_level.
-
#folder ⇒ Object
Returns the value of attribute folder.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #datasources ⇒ Object (also: #ds)
- #datasources_folder ⇒ Object
- #exporters ⇒ Object (also: #es)
- #exporters_folder ⇒ Object
-
#initialize(folder) {|_self| ... } ⇒ Configuration
constructor
A new instance of Configuration.
- #measures ⇒ Object (also: #ms)
- #measures_folder ⇒ Object
Constructor Details
#initialize(folder) {|_self| ... } ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/matt/configuration.rb', line 8 def initialize(folder) @folder = folder @stdout = $stdout @stderr = $stderr = { :write_headers => true } @at_predicate = Matt.yesterday_predicate @debug_level = DEBUG_INFO yield(self) if block_given? end |
Instance Attribute Details
#at_predicate ⇒ Object
Returns the value of attribute at_predicate.
22 23 24 |
# File 'lib/matt/configuration.rb', line 22 def at_predicate @at_predicate end |
#csv_options ⇒ Object
Returns the value of attribute csv_options.
21 22 23 |
# File 'lib/matt/configuration.rb', line 21 def end |
#debug_level ⇒ Object
Returns the value of attribute debug_level.
23 24 25 |
# File 'lib/matt/configuration.rb', line 23 def debug_level @debug_level end |
#folder ⇒ Object
Returns the value of attribute folder.
19 20 21 |
# File 'lib/matt/configuration.rb', line 19 def folder @folder end |
#stderr ⇒ Object
Returns the value of attribute stderr.
20 21 22 |
# File 'lib/matt/configuration.rb', line 20 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
20 21 22 |
# File 'lib/matt/configuration.rb', line 20 def stdout @stdout end |
Instance Method Details
#datasources ⇒ Object Also known as: ds
29 30 31 |
# File 'lib/matt/configuration.rb', line 29 def datasources @datasources ||= load_dynamic_objects(datasources_folder, Matt::Datasource) end |
#datasources_folder ⇒ Object
25 26 27 |
# File 'lib/matt/configuration.rb', line 25 def datasources_folder folder/"datasources" end |
#exporters ⇒ Object Also known as: es
47 48 49 |
# File 'lib/matt/configuration.rb', line 47 def exporters @exporters ||= load_dynamic_objects(exporters_folder, Matt::Exporter) end |
#exporters_folder ⇒ Object
43 44 45 |
# File 'lib/matt/configuration.rb', line 43 def exporters_folder folder/"exporters" end |
#measures ⇒ Object Also known as: ms
38 39 40 |
# File 'lib/matt/configuration.rb', line 38 def measures @measures ||= load_dynamic_objects(measures_folder, Matt::Measure) end |
#measures_folder ⇒ Object
34 35 36 |
# File 'lib/matt/configuration.rb', line 34 def measures_folder folder/"measures" end |