Class: Merrol::MainController

Inherits:
Controller show all
Defined in:
lib/merrol/controllers/main_controller.rb

Instance Method Summary collapse

Methods inherited from Controller

#method_missing, #name

Constructor Details

#initialize(commands, views) ⇒ MainController

Returns a new instance of MainController.



3
4
5
6
# File 'lib/merrol/controllers/main_controller.rb', line 3

def initialize commands, views
  super commands, views
  main_view.signal_connect('destroy') { Gtk.main_quit}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Merrol::Controller

Instance Method Details

#cancelObject



21
22
# File 'lib/merrol/controllers/main_controller.rb', line 21

def cancel
end

#numbersObject



13
14
15
# File 'lib/merrol/controllers/main_controller.rb', line 13

def numbers

end

#quitObject



17
18
19
# File 'lib/merrol/controllers/main_controller.rb', line 17

def quit
  main_view.destroy
end

#working_dir=(working_dir) ⇒ Object



8
9
10
11
# File 'lib/merrol/controllers/main_controller.rb', line 8

def working_dir= working_dir
  name = File.basename(working_dir)
  main_view.title = "#{name} (#{working_dir[0..-name.length - 2]})"
end