Class: Kpop::FrameComponent

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Katalyst::HtmlAttributes, Turbo::FramesHelper
Defined in:
app/components/kpop/frame_component.rb

Constant Summary collapse

ACTIONS =
%w[
  popstate@window->kpop--frame#popstate
  scrim:dismiss@window->kpop--frame#dismiss
  scrim:hide@window->kpop--frame#dismiss
  turbo:before-frame-render->kpop--frame#beforeFrameRender
  turbo:before-stream-render@window->kpop--frame#beforeStreamRender
  turbo:before-visit@window->kpop--frame#beforeVisit
  turbo:frame-load->kpop--frame#frameLoad
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: "kpop", scrim: "#scrim") ⇒ FrameComponent

Returns a new instance of FrameComponent.



20
21
22
23
24
25
# File 'app/components/kpop/frame_component.rb', line 20

def initialize(id: "kpop", scrim: "#scrim", **)
  super

  @id    = id
  @scrim = scrim
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'app/components/kpop/frame_component.rb', line 8

def id
  @id
end

Instance Method Details

#inspectObject



27
28
29
# File 'app/components/kpop/frame_component.rb', line 27

def inspect
  "#<#{self.class.name} id: #{id.inspect}>"
end