Class: RailsServerMonitor::Warnings::WarningComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/rails_server_monitor/warnings/warning_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ctx:, snapshot:, warning:) ⇒ WarningComponent

Returns a new instance of WarningComponent.



7
8
9
10
11
# File 'app/components/rails_server_monitor/warnings/warning_component.rb', line 7

def initialize(ctx:, snapshot:, warning:)
  @ctx = ctx
  @snapshot = snapshot
  @warning = warning
end

Instance Attribute Details

#ctxObject (readonly)

Returns the value of attribute ctx.



6
7
8
# File 'app/components/rails_server_monitor/warnings/warning_component.rb', line 6

def ctx
  @ctx
end

#snapshotObject (readonly)

Returns the value of attribute snapshot.



6
7
8
# File 'app/components/rails_server_monitor/warnings/warning_component.rb', line 6

def snapshot
  @snapshot
end

#warningObject (readonly)

Returns the value of attribute warning.



6
7
8
# File 'app/components/rails_server_monitor/warnings/warning_component.rb', line 6

def warning
  @warning
end