Class: GtkApp::Controller

Inherits:
Object
  • Object
show all
Includes:
Helpers, SignalSupport
Defined in:
lib/gtk_app/controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SignalSupport

included

Methods included from Helpers

#log

Constructor Details

#initialize(&block) ⇒ Controller

Returns a new instance of Controller.



8
9
10
11
12
# File 'lib/gtk_app/controller.rb', line 8

def initialize(&block)
  instance_eval(&block) if block_given?
  
  establish_signal_connections
end

Instance Attribute Details

#modelObject

Returns the value of attribute model.



6
7
8
# File 'lib/gtk_app/controller.rb', line 6

def model
  @model
end

#viewObject

Returns the value of attribute view.



6
7
8
# File 'lib/gtk_app/controller.rb', line 6

def view
  @view
end

Instance Method Details

#quit(with_validations = true) ⇒ Object



14
15
16
17
18
# File 'lib/gtk_app/controller.rb', line 14

def quit(with_validations=true)
  # TODO: if with_validations
  # end
  GtkApp.quit
end