Class: Putter::Configuration
- Inherits:
-
Object
- Object
- Putter::Configuration
- Defined in:
- lib/putter/configuration.rb
Instance Attribute Summary collapse
-
#allow_production ⇒ Object
Returns the value of attribute allow_production.
- #ignore_methods_from ⇒ Object
-
#methods_allowlist ⇒ Object
Returns the value of attribute methods_allowlist.
-
#methods_denylist ⇒ Object
Returns the value of attribute methods_denylist.
-
#print_strategy ⇒ Object
Returns the value of attribute print_strategy.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#methods_blacklist= ⇒ Object
Sets the attribute methods_denylist.
-
#methods_whitelist= ⇒ Object
Sets the attribute methods_allowlist.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 |
# File 'lib/putter/configuration.rb', line 9 def initialize @ignore_methods_from = [Object] @ignore_methods_from << ActiveRecord::Base if defined?(ActiveRecord::Base) @print_strategy = PrintStrategy::Default @allow_production = false @methods_allowlist = [] @methods_denylist = [] end |
Instance Attribute Details
#allow_production ⇒ Object
Returns the value of attribute allow_production.
3 4 5 |
# File 'lib/putter/configuration.rb', line 3 def allow_production @allow_production end |
#ignore_methods_from ⇒ Object
18 19 20 |
# File 'lib/putter/configuration.rb', line 18 def ignore_methods_from convert_to_array(@ignore_methods_from) end |
#methods_allowlist ⇒ Object
Returns the value of attribute methods_allowlist.
3 4 5 |
# File 'lib/putter/configuration.rb', line 3 def methods_allowlist @methods_allowlist end |
#methods_denylist ⇒ Object
Returns the value of attribute methods_denylist.
3 4 5 |
# File 'lib/putter/configuration.rb', line 3 def methods_denylist @methods_denylist end |
#print_strategy ⇒ Object
Returns the value of attribute print_strategy.
3 4 5 |
# File 'lib/putter/configuration.rb', line 3 def print_strategy @print_strategy end |
Instance Method Details
#methods_blacklist= ⇒ Object
Sets the attribute methods_denylist
7 8 9 |
# File 'lib/putter/configuration.rb', line 7 def methods_denylist=(value) @methods_denylist = value end |
#methods_whitelist= ⇒ Object
Sets the attribute methods_allowlist
6 7 8 |
# File 'lib/putter/configuration.rb', line 6 def methods_allowlist=(value) @methods_allowlist = value end |