Class: PlanMyStuff::Issue::PageInfo

Inherits:
Data
  • Object
show all
Defined in:
lib/plan_my_stuff/issue.rb

Overview

Value object returned by Issue.list_page_info: the fetched issues plus pagination metadata read from the Link header of the list_issues response. :total_pages is intentionally absent – GitHub’s issues endpoint is cursor-paginated and never advertises rel=“last”.

Instance Attribute Summary collapse

Instance Attribute Details

#has_nextObject (readonly) Also known as: has_next?

Returns the value of attribute has_next

Returns:

  • (Object)

    the current value of has_next



22
23
24
# File 'lib/plan_my_stuff/issue.rb', line 22

def has_next
  @has_next
end

#has_prevObject (readonly) Also known as: has_prev?

Returns the value of attribute has_prev

Returns:

  • (Object)

    the current value of has_prev



22
23
24
# File 'lib/plan_my_stuff/issue.rb', line 22

def has_prev
  @has_prev
end

#issuesObject (readonly)

Returns the value of attribute issues

Returns:

  • (Object)

    the current value of issues



22
23
24
25
# File 'lib/plan_my_stuff/issue.rb', line 22

PageInfo = Data.define(:issues, :page, :per_page, :has_next, :has_prev) do
  alias_method :has_next?, :has_next
  alias_method :has_prev?, :has_prev
end

#pageObject (readonly)

Returns the value of attribute page

Returns:

  • (Object)

    the current value of page



22
23
24
25
# File 'lib/plan_my_stuff/issue.rb', line 22

PageInfo = Data.define(:issues, :page, :per_page, :has_next, :has_prev) do
  alias_method :has_next?, :has_next
  alias_method :has_prev?, :has_prev
end

#per_pageObject (readonly)

Returns the value of attribute per_page

Returns:

  • (Object)

    the current value of per_page



22
23
24
25
# File 'lib/plan_my_stuff/issue.rb', line 22

PageInfo = Data.define(:issues, :page, :per_page, :has_next, :has_prev) do
  alias_method :has_next?, :has_next
  alias_method :has_prev?, :has_prev
end