Module: Salticid::Interface::Resizeable
- Included in:
- View
- Defined in:
- lib/salticid/interface/resizable.rb
Instance Method Summary collapse
Instance Method Details
#resize(dimensions = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/salticid/interface/resizable.rb', line 4 def resize(dimensions = nil) case dimensions when Hash # Resize self @height = dimensions[:height] if dimensions[:height] @width = dimensions[:width] if dimensions[:width] @top = dimensions[:top] if dimensions[:top] @left = dimensions[:left] if dimensions[:left] if @window # Resize window @window.move @top, @left @window.resize @height, @width end true else # Resize parent @interface.resize false end end |