Class: YourImageShare::ListMeta

Inherits:
Struct
  • Object
show all
Defined in:
lib/yourimageshare/types.rb

Overview

Pagination info for a #list result.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#current_pageObject

Returns the value of attribute current_page

Returns:

  • (Object)

    the current value of current_page



21
22
23
# File 'lib/yourimageshare/types.rb', line 21

def current_page
  @current_page
end

#last_pageObject

Returns the value of attribute last_page

Returns:

  • (Object)

    the current value of last_page



21
22
23
# File 'lib/yourimageshare/types.rb', line 21

def last_page
  @last_page
end

#totalObject

Returns the value of attribute total

Returns:

  • (Object)

    the current value of total



21
22
23
# File 'lib/yourimageshare/types.rb', line 21

def total
  @total
end

Class Method Details

.from_json(h) ⇒ Object



22
23
24
# File 'lib/yourimageshare/types.rb', line 22

def self.from_json(h)
  new(current_page: h["current_page"], last_page: h["last_page"], total: h["total"])
end