class SimplePaginate::Helpers::Paginator::PageProxy
Public Class Methods
new(options)
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 32 def initialize(options) @options = options end
Public Instance Methods
+(other)
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 56 def +(other) to_i + other.to_i end
-(other)
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 60 def -(other) to_i - other.to_i end
<=>(other)
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 64 def <=>(other) to_i <=> other.to_i end
first?()
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 40 def first? @options[:current_page] == 1 end
last?()
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 44 def last? @options[:length] < @options[:per_page] end
number()
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 36 def number @options[:current_page] end
to_i()
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 48 def to_i number end
to_s()
click to toggle source
# File lib/simple_paginate/helpers/paginator.rb, line 52 def to_s number.to_s end