Class: Rabbit::VideoWindow
- Inherits:
-
Object
- Object
- Rabbit::VideoWindow
- Defined in:
- lib/rabbit/video-window.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(window) ⇒ VideoWindow
constructor
A new instance of VideoWindow.
- #show(element) ⇒ Object
Constructor Details
#initialize(window) ⇒ VideoWindow
Returns a new instance of VideoWindow.
37 38 39 40 41 |
# File 'lib/rabbit/video-window.rb', line 37 def initialize(window) @parent_window = window init_window init_keys end |
Class Method Details
.show(window, element) ⇒ Object
27 28 29 30 |
# File 'lib/rabbit/video-window.rb', line 27 def show(window, element) @instance ||= VideoWindow.new(window) @instance.show(element) end |
.unset_instance ⇒ Object
32 33 34 |
# File 'lib/rabbit/video-window.rb', line 32 def unset_instance @instance = nil end |
Instance Method Details
#show(element) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/rabbit/video-window.rb', line 43 def show(element) @player.filename = element.filename @window.resize(element.width, element.height) @window.show_all @player. = true end |