Sha256: 69cda78f0db53d8dcac8ba38fc204f19a5ee2629ba2c4d59a1076c1c0cd1fede

Contents?: true

Size: 526 Bytes

Versions: 49

Compression:

Stored size: 526 Bytes

Contents

module Shelly
  class Backup < Model
    LIMIT = 10
    attr_reader :filename, :size, :human_size, :code_name, :kind, :state

    def initialize(attributes = {})
      @filename   = attributes["filename"]
      @size       = attributes["size"]
      @human_size = attributes["human_size"]
      @code_name  = attributes["code_name"]
      @kind       = attributes["kind"]
      @state      = attributes["state"]
    end

    def download(callback)
      shelly.download_backup(code_name, filename, callback)
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
shelly-0.2.6.pre lib/shelly/backup.rb
shelly-0.2.5 lib/shelly/backup.rb
shelly-0.2.4 lib/shelly/backup.rb
shelly-0.2.3 lib/shelly/backup.rb
shelly-0.2.2 lib/shelly/backup.rb
shelly-0.2.1 lib/shelly/backup.rb
shelly-0.2.0 lib/shelly/backup.rb
shelly-0.1.40 lib/shelly/backup.rb
shelly-0.1.39 lib/shelly/backup.rb
shelly-0.1.38 lib/shelly/backup.rb
shelly-0.1.37.pre lib/shelly/backup.rb
shelly-0.1.36 lib/shelly/backup.rb
shelly-0.1.35 lib/shelly/backup.rb
shelly-0.1.34 lib/shelly/backup.rb
shelly-0.1.34.pre lib/shelly/backup.rb
shelly-0.1.33 lib/shelly/backup.rb
shelly-0.1.32 lib/shelly/backup.rb
shelly-0.1.31 lib/shelly/backup.rb
shelly-0.1.30 lib/shelly/backup.rb
shelly-0.1.29 lib/shelly/backup.rb