Class: Gtk::Box

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

Class Method Summary collapse

Class Method Details

.new(type) ⇒ Object



185
186
187
188
189
190
191
192
193
194
195
# File 'lib/rabbit/gtk.rb', line 185

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