class JustGiving::Response

Attributes

errors[RW]

Public Class Methods

new(errors) click to toggle source
# File lib/just_giving/response.rb, line 4
def initialize(errors)
  @errors = []
  errors.each{|e| @errors << Hashie::Mash.new(e)}
end

Public Instance Methods

[](key) click to toggle source
# File lib/just_giving/response.rb, line 13
def [](key)
  if respond_to?(key.to_sym)
    send(key.to_sym)
  else
    nil
  end
end
any?() click to toggle source
# File lib/just_giving/response.rb, line 9
def any?
  errors.any?
end