luck 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/luck/display.rb +12 -2
- data/luck.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/luck/display.rb
CHANGED
@@ -91,7 +91,12 @@ class Display
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def cycle_controls
|
94
|
-
|
94
|
+
if RUBY_VERSION.to_f > 1.8
|
95
|
+
index = @active_pane.controls.keys.index @active_pane.controls.key(@active_control)
|
96
|
+
else
|
97
|
+
index = @active_pane.controls.keys.index @active_pane.controls.index(@active_control)
|
98
|
+
end
|
99
|
+
|
95
100
|
begin
|
96
101
|
index += 1
|
97
102
|
index = 0 if index >= @active_pane.controls.size
|
@@ -103,7 +108,12 @@ class Display
|
|
103
108
|
end
|
104
109
|
|
105
110
|
def cycle_controls_back
|
106
|
-
|
111
|
+
if RUBY_VERSION.to_f > 1.8
|
112
|
+
index = @active_pane.controls.keys.index @active_pane.controls.key(@active_control)
|
113
|
+
else
|
114
|
+
index = @active_pane.controls.keys.index @active_pane.controls.index(@active_control)
|
115
|
+
end
|
116
|
+
|
107
117
|
begin
|
108
118
|
index -= 1
|
109
119
|
index = @active_pane.controls.size - 1 if index < 0
|
data/luck.gemspec
CHANGED