Sha256: 7abcfd2d7adadbf30a9f22d9b637a52b402739906bd80294796c00581a9c50a2

Contents?: true

Size: 327 Bytes

Versions: 8

Compression:

Stored size: 327 Bytes

Contents

module Skydrive
  # The class that handles the errors
  class Error < StandardError
    attr_reader :code, :error_message, :message
    def initialize error
      @code = error["code"]
      @error_message = error["message"]
    end

    def message
      "#{code}: #{error_message}"
    end

    alias :to_s :message
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
skydrive-1.2.0 lib/skydrive/error.rb
skydrive-1.1.0 lib/skydrive/error.rb
skydrive-1.0.0 lib/skydrive/error.rb
skydrive-0.1.5 lib/skydrive/error.rb
skydrive-0.1.4 lib/skydrive/error.rb
skydrive-0.1.0 lib/skydrive/error.rb
skydrive-0.0.2 lib/skydrive/error.rb
skydrive-0.0.1 lib/skydrive/error.rb