Class: Perus::Pinger::Upload

Inherits:
Command
  • Object
show all
Defined in:
lib/perus/pinger/commands/upload.rb

Instance Attribute Summary

Attributes inherited from Command

#id, #options

Instance Method Summary collapse

Methods inherited from Command

abstract!, abstract?, #darwin?, description, human_name, inherited, #initialize, metric!, metric?, option, options, #shell, subclasses

Constructor Details

This class inherits a constructor from Perus::Pinger::Command

Instance Method Details

#cleanupObject



11
12
13
# File 'lib/perus/pinger/commands/upload.rb', line 11

def cleanup
    @file.close unless @file.nil? || @file.closed?
end

#runObject



7
8
9
# File 'lib/perus/pinger/commands/upload.rb', line 7

def run
    @file = File.new(options.path)
end