Class: Obscenity::Config
- Inherits:
-
Object
- Object
- Obscenity::Config
- Defined in:
- lib/obscenity/config.rb
Constant Summary collapse
- DEFAULT_WHITELIST =
[]
- DEFAULT_BLACKLIST =
File.dirname(__FILE__) + "/../../config/blacklist.yml"
Instance Attribute Summary collapse
-
#replacement ⇒ Object
Returns the value of attribute replacement.
Instance Method Summary collapse
- #blacklist ⇒ Object
- #blacklist=(value) ⇒ Object
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
- #whitelist ⇒ Object
- #whitelist=(value) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
9 10 11 12 |
# File 'lib/obscenity/config.rb', line 9 def initialize yield(self) if block_given? end |
Instance Attribute Details
#replacement ⇒ Object
Returns the value of attribute replacement.
4 5 6 |
# File 'lib/obscenity/config.rb', line 4 def replacement @replacement end |
Instance Method Details
#blacklist ⇒ Object
18 19 20 |
# File 'lib/obscenity/config.rb', line 18 def blacklist @blacklist ||= DEFAULT_BLACKLIST end |
#blacklist=(value) ⇒ Object
22 23 24 |
# File 'lib/obscenity/config.rb', line 22 def blacklist=(value) @blacklist = value == :default ? DEFAULT_BLACKLIST : value end |
#whitelist ⇒ Object
26 27 28 |
# File 'lib/obscenity/config.rb', line 26 def whitelist @whitelist ||= DEFAULT_WHITELIST end |
#whitelist=(value) ⇒ Object
30 31 32 |
# File 'lib/obscenity/config.rb', line 30 def whitelist=(value) @whitelist = value == :default ? DEFAULT_WHITELIST : value end |