Class: OpenSandbox::SandboxList

Inherits:
Data
  • Object
show all
Defined in:
lib/open_sandbox/models.rb

Overview

Value object for list response

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



74
75
76
# File 'lib/open_sandbox/models.rb', line 74

def items
  @items
end

#paginationObject (readonly)

Returns the value of attribute pagination

Returns:

  • (Object)

    the current value of pagination



74
75
76
# File 'lib/open_sandbox/models.rb', line 74

def pagination
  @pagination
end

Class Method Details

.from_hash(h) ⇒ Object



75
76
77
78
79
80
# File 'lib/open_sandbox/models.rb', line 75

def self.from_hash(h)
  new(
    items:      (h["items"] || []).map { Sandbox.from_hash(_1) },
    pagination: PaginationInfo.from_hash(h["pagination"])
  )
end