Class: GoogleDrive::OAuth2Fetcher::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/google_drive/oauth2_fetcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_res) ⇒ Response

Returns a new instance of Response.



14
15
16
# File 'lib/google_drive/oauth2_fetcher.rb', line 14

def initialize(raw_res)
  @raw_res = raw_res
end

Instance Method Details

#[](name) ⇒ Object



26
27
28
# File 'lib/google_drive/oauth2_fetcher.rb', line 26

def [](name)
  return @raw_res.headers[name]
end

#bodyObject



22
23
24
# File 'lib/google_drive/oauth2_fetcher.rb', line 22

def body
  return @raw_res.body
end

#codeObject



18
19
20
# File 'lib/google_drive/oauth2_fetcher.rb', line 18

def code
  return @raw_res.status.to_s()
end