Class: Putter::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/putter/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_productionObject

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_fromObject



18
19
20
# File 'lib/putter/configuration.rb', line 18

def ignore_methods_from
  convert_to_array(@ignore_methods_from)
end

#methods_allowlistObject

Returns the value of attribute methods_allowlist.



3
4
5
# File 'lib/putter/configuration.rb', line 3

def methods_allowlist
  @methods_allowlist
end

#methods_denylistObject

Returns the value of attribute methods_denylist.



3
4
5
# File 'lib/putter/configuration.rb', line 3

def methods_denylist
  @methods_denylist
end

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

Parameters:

  • value

    the value to set the attribute methods_denylist to.



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

Parameters:

  • value

    the value to set the attribute methods_allowlist to.



6
7
8
# File 'lib/putter/configuration.rb', line 6

def methods_allowlist=(value)
  @methods_allowlist = value
end