Class: Headless
- Inherits:
-
Object
- Object
- Headless
- Defined in:
- lib/headless/core_ext/random_display.rb
Overview
Redifinition of the Headless class, which works as a wrapper arround Xvfb.
Instance Method Summary collapse
-
#old_pick_available_display ⇒ Object
Link to original implemenmtarion of Headless#pick_available_display.
-
#pick_available_display(display_set, can_reuse) ⇒ Object
Shuffles the original display set generated by Headless.
Instance Method Details
#old_pick_available_display ⇒ Object
Link to original implemenmtarion of Headless#pick_available_display
8 |
# File 'lib/headless/core_ext/random_display.rb', line 8 alias_method :old_pick_available_display, :pick_available_display |
#pick_available_display(display_set, can_reuse) ⇒ Object
Shuffles the original display set generated by Headless. This makes the display picking random while still using the original avalability check algorithm.
12 13 14 |
# File 'lib/headless/core_ext/random_display.rb', line 12 def pick_available_display(display_set, can_reuse) old_pick_available_display display_set.to_a.shuffle, can_reuse end |