Sha256: 994dfe9d5a351f3d39b00f1a5a952dceb63e943747d57b62ec12deee2aae3142

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

module Doggy
  class CLI::Pull
    attr_reader :options, :ids

    def initialize(options, ids)
      @options = options
      @ids = ids
    end

    def run
      begin
        if ids.any?
          Doggy::Dash.download(ids)
          Doggy::Monitor.download(ids)
          Doggy::Screen.download(ids)
        else
          Doggy::Dash.download_all
          Doggy::Monitor.download_all
          Doggy::Screen.download_all
        end
      rescue DoggyError
        puts "Pull failed."
        exit 1
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
doggy-0.1.3 lib/doggy/cli/pull.rb
doggy-0.1.2 lib/doggy/cli/pull.rb
doggy-0.1.1 lib/doggy/cli/pull.rb
doggy-0.1.0 lib/doggy/cli/pull.rb