Sha256: d776a3bc453b756937760727c634c08104fec4acc6b779365f1ae5a604a49e71

Contents?: true

Size: 234 Bytes

Versions: 10

Compression:

Stored size: 234 Bytes

Contents

module UnifiedDB
  class ApiError < RuntimeError
  
    def to_h
      {
        :result => 'error',
        :reason => message
      }
    end
    
    def to_json(*args)
      UnifiedDB.json_encoder.encode to_h
    end
  
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
unified_db-0.2.7 lib/unified_db/api_error.rb
unified_db-0.2.6 lib/unified_db/api_error.rb
unified_db-0.2.5 lib/unified_db/api_error.rb
unified_db-0.2.4 lib/unified_db/api_error.rb
unified_db-0.2.3 lib/unified_db/api_error.rb
unified_db-0.2.2 lib/unified_db/api_error.rb
unified_db-0.2.1 lib/unified_db/api_error.rb
unified_db-0.2.0 lib/unified_db/api_error.rb
unified_db-0.1.1 lib/unified_db/api_error.rb
unified_db-0.1.0 lib/unified_db/api_error.rb