Sha256: 46e6724a2d116a092527a0ac425672c4abdf0d6df4261a8b76339c48cf5c5047

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 Bytes

Contents

module ThreeScale
  class Response
    def initialize(options)
      @success = options[:success]
      @errors  = options[:errors] || []
    end

    def success?
      @success
    end
  
    Error = Struct.new(:index, :code, :message)
    
    attr_reader :errors

    def add_error(*args)
      @errors << Error.new(*args)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
3scale_client-2.0.1 lib/three_scale/response.rb