Class: Renogen::Config
- Inherits:
-
Object
- Object
- Renogen::Config
- Includes:
- Singleton
- Defined in:
- lib/renogen/config.rb
Overview
Stores configuratin values to be used by the libary
Instance Attribute Summary collapse
-
#changelog_path ⇒ Object
Returns the value of attribute changelog_path.
-
#default_headings ⇒ Object
Returns the value of attribute default_headings.
-
#input_source ⇒ Object
Returns the value of attribute input_source.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#single_line_format ⇒ Object
Returns the value of attribute single_line_format.
-
#supported_keys ⇒ Object
Returns the value of attribute supported_keys.
Class Method Summary collapse
-
.configure {|instance| ... } ⇒ Object
Renogen configuration extension a block can be provided to programatily setup configuration values.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 17 18 |
# File 'lib/renogen/config.rb', line 10 def initialize config_file = load_yaml_config self.single_line_format = config_file['single_line_format'] || 'summary (see link)'.freeze self.supported_keys = config_file['supported_keys'] || ['identifier', 'link', 'summary'].freeze self.input_source = config_file['input_source'] || 'yaml'.freeze self.output_format = config_file['output_format'] || 'markdown'.freeze self.changelog_path = config_file['changelog_path'] || './change_log'.freeze self.default_headings = config_file['default_headings'] || %w(Summary Detailed Tasks).freeze end |
Instance Attribute Details
#changelog_path ⇒ Object
Returns the value of attribute changelog_path.
8 9 10 |
# File 'lib/renogen/config.rb', line 8 def changelog_path @changelog_path end |
#default_headings ⇒ Object
Returns the value of attribute default_headings.
8 9 10 |
# File 'lib/renogen/config.rb', line 8 def default_headings @default_headings end |
#input_source ⇒ Object
Returns the value of attribute input_source.
8 9 10 |
# File 'lib/renogen/config.rb', line 8 def input_source @input_source end |
#output_format ⇒ Object
Returns the value of attribute output_format.
8 9 10 |
# File 'lib/renogen/config.rb', line 8 def output_format @output_format end |
#single_line_format ⇒ Object
Returns the value of attribute single_line_format.
8 9 10 |
# File 'lib/renogen/config.rb', line 8 def single_line_format @single_line_format end |
#supported_keys ⇒ Object
Returns the value of attribute supported_keys.
8 9 10 |
# File 'lib/renogen/config.rb', line 8 def supported_keys @supported_keys end |
Class Method Details
.configure {|instance| ... } ⇒ Object
Renogen configuration extension a block can be provided to programatily setup configuration values
23 24 25 |
# File 'lib/renogen/config.rb', line 23 def self.configure yield instance end |