class KeyholeIO::Response

Attributes

data[RW]
meta[RW]

Public Class Methods

new(response) click to toggle source
# File lib/keyholeio.rb, line 11
def initialize response
  resp = JSON.parse response
  @meta = resp["meta"]
  if @meta["status"] >= 200 and @meta["status"] <= 299
    @data = resp["data"]
  end
end

Public Instance Methods

successful?() click to toggle source
# File lib/keyholeio.rb, line 19
def successful?
  @meta["status"] >= 200 and @meta["status"] <= 299
end