struct

WillPaginate::PageNumber

Inherits Struct < Value < Object

Целое, представляющее номер страницы. Порт page_number.rb.

Constants

BIGINT = 9223372036854775807_i64

значение больше этого не поддерживается в SQL-запросах

Constructors

new(value : Int32 | Int64 | String | Nil, name : String = "page")

Instance methods

*(other : Int) : Int64
+(other : Int) : Int64
-(other : Int) : Int64
/(other : Int) : Int64
<(other : Int) : Bool
<=>(other : PageNumber) : Int32
<=>(other : Int) : Int32
==(other : PageNumber) : Bool
==(other : Int) : Bool
>(other : Int) : Bool
inspect(io : IO) : Nil

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
name
to_i
to_offset(per_page : Int) : PageNumber
to_s(io : IO) : Nil

Same as #inspect(io).