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.26 lib/shelly/backup.rb
shelly-0.2.25 lib/shelly/backup.rb
shelly-0.2.24 lib/shelly/backup.rb
shelly-0.2.23 lib/shelly/backup.rb
shelly-0.2.22 lib/shelly/backup.rb
shelly-0.2.21 lib/shelly/backup.rb
shelly-0.2.20 lib/shelly/backup.rb
shelly-0.2.19 lib/shelly/backup.rb
shelly-0.2.18 lib/shelly/backup.rb
shelly-0.2.17 lib/shelly/backup.rb
shelly-0.2.16 lib/shelly/backup.rb
shelly-0.2.15 lib/shelly/backup.rb
shelly-0.2.14 lib/shelly/backup.rb
shelly-0.2.13 lib/shelly/backup.rb
shelly-0.2.12 lib/shelly/backup.rb
shelly-0.2.11 lib/shelly/backup.rb
shelly-0.2.10 lib/shelly/backup.rb
shelly-0.2.9 lib/shelly/backup.rb
shelly-0.2.8 lib/shelly/backup.rb
shelly-0.2.7 lib/shelly/backup.rb