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.
-
#remove_duplicates ⇒ Object
Returns the value of attribute remove_duplicates.
-
#single_line_format ⇒ Object
Returns the value of attribute single_line_format.
-
#supported_keys ⇒ Object
Returns the value of attribute supported_keys.
-
#validations ⇒ Object
Returns the value of attribute validations.
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.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/renogen/config.rb', line 13 def initialize config_file = load_yaml_config self.single_line_format = config_file['single_line_format'] || 'summary (see link)' self.supported_keys = config_file['supported_keys'] || %w(identifier link summary) self.input_source = config_file['input_source'] || 'yaml' self.output_format = config_file['output_format'] || 'markdown' self.changelog_path = config_file['changelog_path'] || './change_log' self.default_headings = config_file['default_headings'] || %w(Summary Detailed Tasks) self.validations = config_file['allowed_values'] self.remove_duplicates = config_file['remove_duplicates'] || false end |
Instance Attribute Details
#changelog_path ⇒ Object
Returns the value of attribute changelog_path.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def changelog_path @changelog_path end |
#default_headings ⇒ Object
Returns the value of attribute default_headings.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def default_headings @default_headings end |
#input_source ⇒ Object
Returns the value of attribute input_source.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def input_source @input_source end |
#output_format ⇒ Object
Returns the value of attribute output_format.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def output_format @output_format end |
#remove_duplicates ⇒ Object
Returns the value of attribute remove_duplicates.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def remove_duplicates @remove_duplicates end |
#single_line_format ⇒ Object
Returns the value of attribute single_line_format.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def single_line_format @single_line_format end |
#supported_keys ⇒ Object
Returns the value of attribute supported_keys.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def supported_keys @supported_keys end |
#validations ⇒ Object
Returns the value of attribute validations.
10 11 12 |
# File 'lib/renogen/config.rb', line 10 def validations @validations end |
Class Method Details
.configure {|instance| ... } ⇒ Object
Renogen configuration extension a block can be provided to programatily setup configuration values
27 28 29 |
# File 'lib/renogen/config.rb', line 27 def self.configure yield instance end |