Class: TurboScroll::AutoStream

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AutoStream.



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

def initialize(page:, loader_dom_id: :turbo_loader, loading_indicator:, infinite_dom_id: :infinite)
  @page = page
  @infinite_dom_id = infinite_dom_id
  @loading_indicator = loading_indicator
  @loader_dom_id = loader_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/auto_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/auto_stream.rb', line 9

def loader_dom_id
  @loader_dom_id
end

#loading_indicatorObject (readonly)

Returns the value of attribute loading_indicator.



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

def loading_indicator
  @loading_indicator
end

#pageObject (readonly)

Returns the value of attribute page.



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

def page
  @page
end