class Putter::Configuration
Attributes
allow_production[RW]
ignore_methods_from[W]
methods_allowlist[RW]
methods_blacklist=[RW]
methods_denylist[RW]
methods_whitelist=[RW]
print_strategy[RW]
Public Class Methods
new()
click to toggle source
# 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
Public Instance Methods
ignore_methods_from()
click to toggle source
# File lib/putter/configuration.rb, line 18 def ignore_methods_from convert_to_array(@ignore_methods_from) end
methods_allowlist=(methods)
click to toggle source
# File lib/putter/configuration.rb, line 22 def methods_allowlist=(methods) raise ::Putter::MethodConflictError unless (@methods_denylist & methods).empty? @methods_allowlist = methods end
methods_denylist=(methods)
click to toggle source
# File lib/putter/configuration.rb, line 28 def methods_denylist=(methods) raise ::Putter::MethodConflictError unless (@methods_allowlist & methods).empty? @methods_denylist = methods end
Private Instance Methods
convert_to_array(val)
click to toggle source
# File lib/putter/configuration.rb, line 36 def convert_to_array(val) if val.nil? [] elsif !val.is_a?(Array) [val] else val end end