Module: SSHTunnel::UI::Helpers::Common::MinimizeHelper

Included in:
ApplicationWindowHelper
Defined in:
lib/ssh-hull/ui/helpers/common/minimize_helper.rb

Instance Method Summary collapse

Instance Method Details

#initializeObject



9
10
11
12
13
14
# File 'lib/ssh-hull/ui/helpers/common/minimize_helper.rb', line 9

def initialize(*)
  super

  # Set instance variables
  @minimized = false
end

#maximize!Object



28
29
30
31
# File 'lib/ssh-hull/ui/helpers/common/minimize_helper.rb', line 28

def maximize!
  @minimized = false
  show
end

#minimize!Object



22
23
24
25
# File 'lib/ssh-hull/ui/helpers/common/minimize_helper.rb', line 22

def minimize!
  @minimized = true
  hide
end

#minimized?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ssh-hull/ui/helpers/common/minimize_helper.rb', line 17

def minimized?
  @minimized
end

#toggle!Object



34
35
36
37
38
39
40
# File 'lib/ssh-hull/ui/helpers/common/minimize_helper.rb', line 34

def toggle!
  if minimized?
    maximize!
  else
    minimize!
  end
end