Sha256: e527105c71db1179b5abf57a5016233bf38c716e041b15c52fedc62f3f3e60b5

Contents?: true

Size: 600 Bytes

Versions: 12

Compression:

Stored size: 600 Bytes

Contents

module NSISam
  # @attr [String] key The key of the stored data/file
  # @attr [String] checksum The checksum of the stored data/file
  # @attr [Hash, String, Array] data The stored object
  class Response
    def initialize(hash)
      @key, @checksum, @data, @deleted, @filename, @file = hash.values_at(
        'key', 'checksum', 'data', 'deleted', 'filename', 'file')
    end

    attr_reader :key, :checksum, :data, :filename, :file

    # Check if some data was deleted sucessfully 
    #
    # @return [Boolean] was the object deleted?
    #
    def deleted?
      !!@deleted
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
nsisam-0.7.7 lib/nsisam/response.rb
nsisam-0.7.6 lib/nsisam/response.rb
nsisam-0.7.5 lib/nsisam/response.rb
nsisam-0.7.4 lib/nsisam/response.rb
nsisam-0.7.3 lib/nsisam/response.rb
nsisam-0.7.2 lib/nsisam/response.rb
nsisam-0.7.1 lib/nsisam/response.rb
nsisam-0.7.0 lib/nsisam/response.rb
nsisam-0.6.4 lib/nsisam/response.rb
nsisam-0.6.3 lib/nsisam/response.rb
nsisam-0.6.2 lib/nsisam/response.rb
nsisam-0.6.1 lib/nsisam/response.rb