Module: Feedjira::Configuration
- Included in:
- Feedjira
- Defined in:
- lib/feedjira/configuration.rb
Overview
Provides global configuration options for Feedjira
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#parsers ⇒ Object
Returns the value of attribute parsers.
-
#strip_whitespace ⇒ Object
Returns the value of attribute strip_whitespace.
Class Method Summary collapse
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Object
Modify Feedjira’s current configuration.
-
#reset_configuration! ⇒ Object
Reset Feedjira’s configuration to defaults.
- #set_default_configuration ⇒ Object
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
12 13 14 |
# File 'lib/feedjira/configuration.rb', line 12 def logger @logger end |
#parsers ⇒ Object
Returns the value of attribute parsers.
12 13 14 |
# File 'lib/feedjira/configuration.rb', line 12 def parsers @parsers end |
#strip_whitespace ⇒ Object
Returns the value of attribute strip_whitespace.
12 13 14 |
# File 'lib/feedjira/configuration.rb', line 12 def strip_whitespace @strip_whitespace end |
Class Method Details
.extended(base) ⇒ Object
38 39 40 |
# File 'lib/feedjira/configuration.rb', line 38 def self.extended(base) base.set_default_configuration end |
Instance Method Details
#configure {|config| ... } ⇒ Object
Modify Feedjira’s current configuration
25 26 27 |
# File 'lib/feedjira/configuration.rb', line 25 def configure yield self end |
#reset_configuration! ⇒ Object
Reset Feedjira’s configuration to defaults
33 34 35 |
# File 'lib/feedjira/configuration.rb', line 33 def reset_configuration! set_default_configuration end |
#set_default_configuration ⇒ Object
43 44 45 46 47 |
# File 'lib/feedjira/configuration.rb', line 43 def set_default_configuration self.logger = default_logger self.parsers = default_parsers self.strip_whitespace = false end |