Class: Gitlab::Graphql::ExternallyPaginatedArray

Inherits:
Array
  • Object
show all
Defined in:
lib/gitlab/graphql/externally_paginated_array.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(previous_cursor, next_cursor, *args, has_next_page: nil, has_previous_page: nil) ⇒ ExternallyPaginatedArray

Returns a new instance of ExternallyPaginatedArray.



8
9
10
11
12
13
14
# File 'lib/gitlab/graphql/externally_paginated_array.rb', line 8

def initialize(previous_cursor, next_cursor, *args, has_next_page: nil, has_previous_page: nil)
  super(args)
  @start_cursor = previous_cursor
  @end_cursor = next_cursor
  @has_next_page = has_next_page
  @has_previous_page = has_previous_page
end

Instance Attribute Details

#end_cursorObject (readonly)

Returns the value of attribute end_cursor.



6
7
8
# File 'lib/gitlab/graphql/externally_paginated_array.rb', line 6

def end_cursor
  @end_cursor
end

#has_next_pageObject (readonly)

Returns the value of attribute has_next_page.



6
7
8
# File 'lib/gitlab/graphql/externally_paginated_array.rb', line 6

def has_next_page
  @has_next_page
end

#has_previous_pageObject (readonly)

Returns the value of attribute has_previous_page.



6
7
8
# File 'lib/gitlab/graphql/externally_paginated_array.rb', line 6

def has_previous_page
  @has_previous_page
end

#start_cursorObject (readonly)

Returns the value of attribute start_cursor.



6
7
8
# File 'lib/gitlab/graphql/externally_paginated_array.rb', line 6

def start_cursor
  @start_cursor
end