Class: TurboScroll::MoreStream

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Turbo::FramesHelper, Turbo::StreamsHelper
Defined in:
lib/turbo-scroll/more_stream.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page:, loader_dom_id: :turbo_loader, infinite_dom_id: :infinite) ⇒ MoreStream

Returns a new instance of MoreStream.



11
12
13
14
15
# File 'lib/turbo-scroll/more_stream.rb', line 11

def initialize(page:, loader_dom_id: :turbo_loader, infinite_dom_id: :infinite)
  @page = page
  @loader_dom_id = loader_dom_id
  @infinite_dom_id = infinite_dom_id
end

Instance Attribute Details

#infinite_dom_idObject (readonly)

Returns the value of attribute infinite_dom_id.



9
10
11
# File 'lib/turbo-scroll/more_stream.rb', line 9

def infinite_dom_id
  @infinite_dom_id
end

#loader_dom_idObject (readonly)

Returns the value of attribute loader_dom_id.



9
10
11
# File 'lib/turbo-scroll/more_stream.rb', line 9

def loader_dom_id
  @loader_dom_id
end

#pageObject (readonly)

Returns the value of attribute page.



9
10
11
# File 'lib/turbo-scroll/more_stream.rb', line 9

def page
  @page
end