Class: Footrest::Pagination::Links

Inherits:
Struct
  • Object
show all
Defined in:
lib/footrest/pagination.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#currentObject

Returns the value of attribute current

Returns:

  • (Object)

    the current value of current



8
9
10
# File 'lib/footrest/pagination.rb', line 8

def current
  @current
end

#firstObject

Returns the value of attribute first

Returns:

  • (Object)

    the current value of first



8
9
10
# File 'lib/footrest/pagination.rb', line 8

def first
  @first
end

#lastObject

Returns the value of attribute last

Returns:

  • (Object)

    the current value of last



8
9
10
# File 'lib/footrest/pagination.rb', line 8

def last
  @last
end

#nextObject

Returns the value of attribute next

Returns:

  • (Object)

    the current value of next



8
9
10
# File 'lib/footrest/pagination.rb', line 8

def next
  @next
end

#prevObject Also known as: previous

Returns the value of attribute prev

Returns:

  • (Object)

    the current value of prev



8
9
10
# File 'lib/footrest/pagination.rb', line 8

def prev
  @prev
end

Instance Method Details

#last_page?Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'lib/footrest/pagination.rb', line 12

def last_page?
  return false unless self.current && self.last
  self.current == self.last
end