class Audiosearch::Response

dependent classes

Attributes

http_resp[RW]

Public Class Methods

new(http_resp) click to toggle source
# File lib/audiosearch.rb, line 191
def initialize(http_resp)
  @http_resp = http_resp

  #warn http_resp.headers.inspect
  #warn "code=" + http_resp.status.to_s

  @is_ok = false
  if http_resp.status.to_s =~ /^2\d\d/
    @is_ok = true
  end

end

Public Instance Methods

is_success() click to toggle source
# File lib/audiosearch.rb, line 208
def is_success()
  return @is_ok
end
method_missing(meth, *args, &block) click to toggle source
Calls superclass method
# File lib/audiosearch.rb, line 212
def method_missing(meth, *args, &block)
  if @http_resp.body.respond_to? meth
    @http_resp.body.send(meth, *args, &block)
  else
    super
  end
end
respond_to?(meth) click to toggle source
Calls superclass method
# File lib/audiosearch.rb, line 220
def respond_to?(meth)
  if @http_resp.body.respond_to? meth
    true
  else
    super
  end
end
status() click to toggle source
# File lib/audiosearch.rb, line 204
def status()
  return @http_resp.status
end