Module: NeverBounce::CLI::Script::Feature::UsesPagination::InstanceMethods

Defined in:
lib/never_bounce/cli/script/feature/uses_pagination.rb

Instance Attribute Summary collapse

Instance Attribute Details

#pageInteger

Page number. Default is env["PAGE"].


24
25
26
27
28
29
30
31
# File 'lib/never_bounce/cli/script/feature/uses_pagination.rb', line 24

def page
  # OPTIMIZE: Consider default-less behaviour some day.
  @page ||= if (v = env["PAGE"])
    Integer(v)
  else
    1
  end
end

#per_pageInteger

Items per page. Default is env["PER_PAGE"].


36
37
38
39
40
41
42
# File 'lib/never_bounce/cli/script/feature/uses_pagination.rb', line 36

def per_page
  @per_page ||= if (v = env["PER_PAGE"])
    Integer(v)
  else
    1000
  end
end