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.



11
12
13
14
15
# File 'lib/gtk_app/controller.rb', line 11

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

  establish_signal_connections
end

Instance Attribute Details

#modelObject



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

def model
  @model
end

#viewObject

Returns the value of attribute view.



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

def view
  @view
end

Instance Method Details

#quit(with_validations = true) ⇒ Object

Parameters:

  • with_validations (Boolean) (defaults to: true)


18
19
20
21
22
# File 'lib/gtk_app/controller.rb', line 18

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