Class: SourceMonitor::LogEntry
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- SourceMonitor::LogEntry
- Defined in:
- app/models/source_monitor/log_entry.rb
Class Method Summary collapse
- .ransackable_associations(_auth_object = nil) ⇒ Object
- .ransackable_attributes(_auth_object = nil) ⇒ Object
Instance Method Summary collapse
Class Method Details
.ransackable_associations(_auth_object = nil) ⇒ Object
30 31 32 |
# File 'app/models/source_monitor/log_entry.rb', line 30 def ransackable_associations(_auth_object = nil) %w[source item loggable] end |
.ransackable_attributes(_auth_object = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/source_monitor/log_entry.rb', line 18 def ransackable_attributes(_auth_object = nil) %w[ success started_at http_status scraper_adapter error_message error_class loggable_type ] end |
Instance Method Details
#fetch? ⇒ Boolean
35 36 37 |
# File 'app/models/source_monitor/log_entry.rb', line 35 def fetch? loggable_type == FetchLog.sti_name end |
#health_check? ⇒ Boolean
43 44 45 |
# File 'app/models/source_monitor/log_entry.rb', line 43 def health_check? loggable_type == HealthCheckLog.sti_name end |
#log_type ⇒ Object
47 48 49 50 51 52 |
# File 'app/models/source_monitor/log_entry.rb', line 47 def log_type return :fetch if fetch? return :scrape if scrape? :health_check end |
#scrape? ⇒ Boolean
39 40 41 |
# File 'app/models/source_monitor/log_entry.rb', line 39 def scrape? loggable_type == ScrapeLog.sti_name end |