Class: Moneybird::Middleware::Pagination::Links

Inherits:
Object
  • Object
show all
Defined in:
lib/moneybird/middleware/pagination/links.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#currentObject

Returns the value of attribute current.



7
8
9
# File 'lib/moneybird/middleware/pagination/links.rb', line 7

def current
  @current
end

#firstObject

Returns the value of attribute first.



7
8
9
# File 'lib/moneybird/middleware/pagination/links.rb', line 7

def first
  @first
end

#lastObject

Returns the value of attribute last.



7
8
9
# File 'lib/moneybird/middleware/pagination/links.rb', line 7

def last
  @last
end

#nextObject

Returns the value of attribute next.



7
8
9
# File 'lib/moneybird/middleware/pagination/links.rb', line 7

def next
  @next
end

#prevObject Also known as: previous

Returns the value of attribute prev.



7
8
9
# File 'lib/moneybird/middleware/pagination/links.rb', line 7

def prev
  @prev
end

Instance Method Details

#last_page?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/moneybird/middleware/pagination/links.rb', line 11

def last_page?
  !current.nil? && !last.nil? && current == last
end