module DManga
module to set operating system
This is a simple example which uses rubyzip to recursively generate a zip file from the contents of a specified directory. The directory itself is not included in the archive, rather just its contents.
Usage:
directory_to_zip = "/tmp/input" output_file = "/tmp/out.zip" zf = ZipFileGenerator.new(directory_to_zip, output_file) zf.write()
Constants
- VERSION
Public Class Methods
display_error(message, error)
click to toggle source
# File lib/dmanga/util.rb, line 6 def self.display_error(message, error) Formatador.display_line("\t[_red_][white][bold]ERRO: #{message}.[/]") Formatador.display_line("\t[_red_][white][bold]ERROR: #{error.message}.[/]") end
display_feedback(str)
click to toggle source
# File lib/dmanga/util.rb, line 11 def self.display_feedback(str) Formatador.display_line("[magenta][bold]#{str}[/]") end
display_prompt(str)
click to toggle source
# File lib/dmanga/util.rb, line 15 def self.display_prompt(str) Formatador.display("[white][bold]#{str}[/]") end
display_warn(str)
click to toggle source
# File lib/dmanga/util.rb, line 19 def self.display_warn(str) Formatador.display_line("[red][bold]#{str}[/]") end