Class: Arli::Actions::UnzipFile

Inherits:
Action
  • Object
show all
Defined in:
lib/arli/actions/unzip_file.rb

Constant Summary

Constants included from Helpers::Output

Helpers::Output::CHAR_FAILURE, Helpers::Output::CHAR_SUCCESS

Instance Attribute Summary

Attributes inherited from Action

#config, #library

Instance Method Summary collapse

Methods inherited from Action

inherited, #initialize, #mv, #run!, #supported?, #to_s

Methods included from Helpers::Inherited

included

Methods included from Helpers::Output

#___, #__p, #__pf, #__pt, #abort?, #action_fail, #action_ok, #backup?, #cursor, #debug, #debug?, disable!, enable!, enabled?, #error, #fuck, #header, #hr, #indent_cursor, #info, #ok, #overwrite?, #print_action_failure, #print_action_starting, #print_action_success, #print_target_dir, #quiet?, #raise_invalid_arli_command!, #report_exception, #verbose?

Constructor Details

This class inherits a constructor from Arli::Actions::Action

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/arli/actions/unzip_file.rb', line 10

def execute
  return if library.url.nil?
  return if library.url !~ /\.zip$/i

  download!
  move_in_place!
rescue Exception => e
  fuck
  raise(e)
ensure
  delete_zip! rescue nil
end