Class: ActiveRecordFormatterHelpers::Report
- Inherits:
-
Object
- Object
- ActiveRecordFormatterHelpers::Report
- Defined in:
- lib/rspec/activerecord/helpers/report.rb
Instance Attribute Summary collapse
-
#collector ⇒ Object
readonly
Returns the value of attribute collector.
-
#default_path ⇒ Object
readonly
Returns the value of attribute default_path.
-
#report_dir ⇒ Object
readonly
Returns the value of attribute report_dir.
-
#report_path ⇒ Object
readonly
Returns the value of attribute report_path.
Instance Method Summary collapse
-
#initialize(collector) ⇒ Report
constructor
A new instance of Report.
- #write ⇒ Object
Constructor Details
#initialize(collector) ⇒ Report
Returns a new instance of Report.
5 6 7 8 9 10 11 |
# File 'lib/rspec/activerecord/helpers/report.rb', line 5 def initialize(collector) @collector = collector @report_dir = Rails.root.join("tmp", "profile") @report_path = report_dir.join() @default_path = report_dir.join('ar_most_recent.txt') end |
Instance Attribute Details
#collector ⇒ Object (readonly)
Returns the value of attribute collector.
3 4 5 |
# File 'lib/rspec/activerecord/helpers/report.rb', line 3 def collector @collector end |
#default_path ⇒ Object (readonly)
Returns the value of attribute default_path.
3 4 5 |
# File 'lib/rspec/activerecord/helpers/report.rb', line 3 def default_path @default_path end |
#report_dir ⇒ Object (readonly)
Returns the value of attribute report_dir.
3 4 5 |
# File 'lib/rspec/activerecord/helpers/report.rb', line 3 def report_dir @report_dir end |
#report_path ⇒ Object (readonly)
Returns the value of attribute report_path.
3 4 5 |
# File 'lib/rspec/activerecord/helpers/report.rb', line 3 def report_path @report_path end |
Instance Method Details
#write ⇒ Object
13 14 15 16 |
# File 'lib/rspec/activerecord/helpers/report.rb', line 13 def write write_file(file_path: report_path) write_file(file_path: default_path) end |