Class: Browserbeam::SessionList

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#has_moreObject

Returns the value of attribute has_more

Returns:

  • (Object)

    the current value of has_more



117
118
119
# File 'lib/browserbeam/types.rb', line 117

def has_more
  @has_more
end

#next_cursorObject

Returns the value of attribute next_cursor

Returns:

  • (Object)

    the current value of next_cursor



117
118
119
# File 'lib/browserbeam/types.rb', line 117

def next_cursor
  @next_cursor
end

#sessionsObject

Returns the value of attribute sessions

Returns:

  • (Object)

    the current value of sessions



117
118
119
# File 'lib/browserbeam/types.rb', line 117

def sessions
  @sessions
end

Class Method Details

.from_hash(data) ⇒ Object



118
119
120
121
122
123
124
# File 'lib/browserbeam/types.rb', line 118

def self.from_hash(data)
  new(
    sessions: (data["sessions"] || []).map { |s| SessionListItem.from_hash(s) },
    has_more: data["has_more"] || false,
    next_cursor: data["next_cursor"],
  )
end