Class: Gtk::Box

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbit/gtk.rb

Class Method Summary collapse

Class Method Details

.new(type) ⇒ Object



192
193
194
195
196
197
198
199
200
201
202
# File 'lib/rabbit/gtk.rb', line 192

def new(type)
  case type
  when :horizontal
    HBox.new
  when :vertical
    VBox.new
  else
    raise ArgumentError,
          "Box type must be :horizontal or :vertical: #{type.inspect}"
  end
end