Class: Fog::Compute::Packet::Sessions

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/compute/packet/models/sessions.rb

Overview

Sessions Collection

Instance Method Summary collapse

Instance Method Details

#all(params = {}) ⇒ Object



14
15
16
17
# File 'lib/fog/compute/packet/models/sessions.rb', line 14

def all(params = {})
  response = service.list_sessions(params)
  load(response.body["sessions"])
end

#delete(session_id = "") ⇒ Object



19
20
21
22
# File 'lib/fog/compute/packet/models/sessions.rb', line 19

def delete(session_id = "")
  response = service.delete_session(session_id)
  true if response.status == 204
end

#login(login_params) ⇒ Object



9
10
11
12
# File 'lib/fog/compute/packet/models/sessions.rb', line 9

def ()
  service.()
  true
end