boomboom 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/boomboom.rb +5 -5
- data/lib/boomboom/version.rb +1 -1
- metadata +1 -1
data/lib/boomboom.rb
CHANGED
@@ -44,7 +44,7 @@ class BoomBoom
|
|
44
44
|
begin
|
45
45
|
value = the_list.fetch item
|
46
46
|
rescue
|
47
|
-
puts "#{item.dup.colorize(:
|
47
|
+
puts "#{item.dup.colorize(:light_white)}" + " not found in".colorize(:red) + " #{list.dup.colorize(:yellow)}"
|
48
48
|
end
|
49
49
|
value
|
50
50
|
rescue KeyError
|
@@ -61,7 +61,7 @@ class BoomBoom
|
|
61
61
|
def set_list_item(list, item, value)
|
62
62
|
create_list list unless has_list? list
|
63
63
|
@boom[list][item] = value
|
64
|
-
puts "#{item.dup.colorize(:
|
64
|
+
puts "#{item.dup.colorize(:light_white)} in #{list.dup.colorize(:green)} is #{value.dup.colorize(:yellow)}. Got it."
|
65
65
|
end
|
66
66
|
|
67
67
|
def delete_list(list)
|
@@ -84,18 +84,18 @@ class BoomBoom
|
|
84
84
|
begin
|
85
85
|
value = @boom[list].fetch item
|
86
86
|
rescue KeyError
|
87
|
-
puts "The item #{item.dup.colorize(:
|
87
|
+
puts "The item #{item.dup.colorize(:light_white)} " + "doesn't exist".colorize(:red) + " in the list #{list.dup.colorize(:green)}."
|
88
88
|
return
|
89
89
|
end
|
90
90
|
@boom[list].delete item
|
91
|
-
puts "Boom!".colorize(:cyan) + " #{item.dup.colorize(:
|
91
|
+
puts "Boom!".colorize(:cyan) + " #{item.dup.colorize(:light_white)} in #{list.dup.colorize(:green)} is gone forever. It was #{value.dup.colorize(:yellow)}."
|
92
92
|
rescue KeyError
|
93
93
|
puts "The list #{list.dup.colorize(:green)} " + "doesn't exist".colorize(:red) + "."
|
94
94
|
end
|
95
95
|
|
96
96
|
def print_list(list)
|
97
97
|
@boom[list].each do |k,v|
|
98
|
-
|
98
|
+
printf " %-#30s %s\n", k.dup.colorize(:light_white)+":", v.dup.colorize(:yellow)
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
data/lib/boomboom/version.rb
CHANGED