Class: Testoscope::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



8
9
10
11
12
13
14
15
16
# File 'lib/testoscope.rb', line 8

def initialize
  self.back_trace_paths = [Rails.root.to_s]
  self.back_trace_exclude_paths = ["#{Rails.root.to_s}/test", "#{Rails.root.to_s}/spec"]
  self.unintened_key_words = ['Seq Scan', 'One-Time Filter']
  self.raise_when_unintended = false
  self.analyze = true
  self.pp_class = "::ActiveRecord::ConnectionAdapters::#{::ActiveRecord::Base.connection.adapter_name}::ExplainPrettyPrinter".constantize
  self.tables = :all
end

Instance Attribute Details

#analyzeObject

Returns the value of attribute analyze.



5
6
7
# File 'lib/testoscope.rb', line 5

def analyze
  @analyze
end

#back_trace_exclude_pathsObject

Returns the value of attribute back_trace_exclude_paths.



5
6
7
# File 'lib/testoscope.rb', line 5

def back_trace_exclude_paths
  @back_trace_exclude_paths
end

#back_trace_pathsObject

Returns the value of attribute back_trace_paths.



5
6
7
# File 'lib/testoscope.rb', line 5

def back_trace_paths
  @back_trace_paths
end

#pp_classObject

Returns the value of attribute pp_class.



5
6
7
# File 'lib/testoscope.rb', line 5

def pp_class
  @pp_class
end

#raise_when_unintendedObject

Returns the value of attribute raise_when_unintended.



5
6
7
# File 'lib/testoscope.rb', line 5

def raise_when_unintended
  @raise_when_unintended
end

#tablesObject

Returns the value of attribute tables.



5
6
7
# File 'lib/testoscope.rb', line 5

def tables
  @tables
end

#unintened_key_wordsObject

Returns the value of attribute unintened_key_words.



5
6
7
# File 'lib/testoscope.rb', line 5

def unintened_key_words
  @unintened_key_words
end