Class: PagyInfiniteScroll::Configuration
- Inherits:
-
Object
- Object
- PagyInfiniteScroll::Configuration
- Defined in:
- lib/pagy_infinite_scroll/configuration.rb
Instance Attribute Summary collapse
-
#auto_initialize ⇒ Object
Returns the value of attribute auto_initialize.
-
#debounce_delay ⇒ Object
Returns the value of attribute debounce_delay.
-
#items_per_page ⇒ Object
Returns the value of attribute items_per_page.
-
#loading_indicator ⇒ Object
Returns the value of attribute loading_indicator.
-
#preserve_state ⇒ Object
Returns the value of attribute preserve_state.
-
#render_mode ⇒ Object
Returns the value of attribute render_mode.
-
#scroll_threshold ⇒ Object
Returns the value of attribute scroll_threshold.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 13 def initialize @items_per_page = 50 @scroll_threshold = 100 # pixels from bottom @loading_indicator = true @auto_initialize = true @preserve_state = true @debounce_delay = 500 # milliseconds @render_mode = 'json' # 'json' or 'js' (for .js.erb templates) end |
Instance Attribute Details
#auto_initialize ⇒ Object
Returns the value of attribute auto_initialize.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def auto_initialize @auto_initialize end |
#debounce_delay ⇒ Object
Returns the value of attribute debounce_delay.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def debounce_delay @debounce_delay end |
#items_per_page ⇒ Object
Returns the value of attribute items_per_page.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def items_per_page @items_per_page end |
#loading_indicator ⇒ Object
Returns the value of attribute loading_indicator.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def loading_indicator @loading_indicator end |
#preserve_state ⇒ Object
Returns the value of attribute preserve_state.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def preserve_state @preserve_state end |
#render_mode ⇒ Object
Returns the value of attribute render_mode.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def render_mode @render_mode end |
#scroll_threshold ⇒ Object
Returns the value of attribute scroll_threshold.
5 6 7 |
# File 'lib/pagy_infinite_scroll/configuration.rb', line 5 def scroll_threshold @scroll_threshold end |