Class: RailsPulse::Charts::Base

Inherits:
Object
  • Object
show all
Defined in:
app/models/rails_pulse/charts/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(ransack_query:, period_type: nil, subject: nil, start_time: nil, end_time: nil, start_duration: nil, disabled_tags: [], show_non_tagged: true, **options) ⇒ Base

Returns a new instance of Base.



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/models/rails_pulse/charts/base.rb', line 4

def initialize(ransack_query:, period_type: nil, subject: nil, start_time: nil, end_time: nil, start_duration: nil, disabled_tags: [], show_non_tagged: true, **options)
  @ransack_query = ransack_query
  @period_type = period_type
  @subject = subject
  @start_time = start_time
  @end_time = end_time
  @start_duration = start_duration
  @disabled_tags = disabled_tags
  @show_non_tagged = show_non_tagged

  # Support legacy parameter names (job, query, route)
  @subject ||= options[:job] || options[:query] || options[:route]
end