Class: Anomonitor::Configuration::TableSource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ TableSource

Returns a new instance of TableSource.



116
117
118
119
120
121
122
123
# File 'lib/anomonitor/configuration.rb', line 116

def initialize(name)
  @name = name
  @timestamp = :created_at
  @status = :status
  @active = %w[pending running]
  @tenant = nil
  @style = :status
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def active
  @active
end

#modelObject

Returns the value of attribute model.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def model
  @model
end

#nameObject

Returns the value of attribute name.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def name
  @name
end

#statusObject

Returns the value of attribute status.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def status
  @status
end

#styleObject

Returns the value of attribute style.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def style
  @style
end

#tenantObject

Returns the value of attribute tenant.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def tenant
  @tenant
end

#timestampObject

Returns the value of attribute timestamp.



114
115
116
# File 'lib/anomonitor/configuration.rb', line 114

def timestamp
  @timestamp
end

Instance Method Details

#delayed_job_style?Boolean

Returns:

  • (Boolean)


129
130
131
# File 'lib/anomonitor/configuration.rb', line 129

def delayed_job_style?
  style.to_s == "delayed_job"
end

#model_classObject



125
126
127
# File 'lib/anomonitor/configuration.rb', line 125

def model_class
  model.to_s.constantize
end