Class: OrderCop::OrderCopConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOrderCopConfig

Returns a new instance of OrderCopConfig.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/order_cop.rb', line 16

def initialize
  @enabled = true
  @raise = true
  @debug = false
  @rails_logger = false
  @whitelist_methods = %i[sum any? none? inspect method_missing not load_target reindex attachment attachments attributes_table with_current_arbre_element]
  @only_view = false
  @view_paths = [
    /app\/views/,
    /app\/helpers/,
    /\.erb/,
    /\.haml/,
    /\.slim/,
    /\(erb\)/
  ].freeze
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



32
33
34
# File 'lib/order_cop.rb', line 32

def debug
  @debug
end

#enabledObject

Returns the value of attribute enabled.



32
33
34
# File 'lib/order_cop.rb', line 32

def enabled
  @enabled
end

#only_viewObject

Returns the value of attribute only_view.



32
33
34
# File 'lib/order_cop.rb', line 32

def only_view
  @only_view
end

#rails_loggerObject

Returns the value of attribute rails_logger.



32
33
34
# File 'lib/order_cop.rb', line 32

def rails_logger
  @rails_logger
end

#raiseObject

Returns the value of attribute raise.



32
33
34
# File 'lib/order_cop.rb', line 32

def raise
  @raise
end

#view_pathsObject

Returns the value of attribute view_paths.



32
33
34
# File 'lib/order_cop.rb', line 32

def view_paths
  @view_paths
end

#whitelist_methodsObject

Returns the value of attribute whitelist_methods.



32
33
34
# File 'lib/order_cop.rb', line 32

def whitelist_methods
  @whitelist_methods
end