Class: Srcpkg

Inherits:
Object
  • Object
show all
Defined in:
lib/srcpkg.rb

Constant Summary collapse

VERSION =
'0.1.0'

Instance Method Summary collapse

Instance Method Details

#err(msg) ⇒ Object

def



29
30
31
32
# File 'lib/srcpkg.rb', line 29

def err(msg)
	puts "  Err: #{msg}"
	exit
end

#install(args) ⇒ Object

def



11
12
13
14
# File 'lib/srcpkg.rb', line 11

def install(args)
	msg "This tool is under development. Please check back later.\n"
	msg "fin"
end

#msg(msg) ⇒ Object

def



34
35
36
# File 'lib/srcpkg.rb', line 34

def msg(msg)
	puts "  #{msg}"
end

#readable_time(time) ⇒ Object

Helpers ###################################################################



18
19
20
21
22
23
24
25
26
27
# File 'lib/srcpkg.rb', line 18

def readable_time(time)
	hours = (time / 3600).to_i
	minutes = ((time - hours) / 60).to_i
	seconds = time - hours * 3600 - minutes * 60
	if hours != 0
		return ('%02d' % hours) + ':' + ('%02d' % minutes) + ':' + ('%02d' % seconds)
	else
		return ('%02d' % minutes) + ':' + ('%02d' % seconds)
	end
end

#version(args) ⇒ Object

Commands ##################################################################



7
8
9
# File 'lib/srcpkg.rb', line 7

def version(args)
	puts "  #{Srcpkg::VERSION}"
end