Class: Fatty::ModalSession

Inherits:
Session
  • Object
show all
Defined in:
lib/fatty/session/modal_session.rb

Direct Known Subclasses

PopUpSession, PromptSession

Instance Attribute Summary collapse

Attributes inherited from Session

#counter, #id, #keymap, #terminal

Instance Method Summary collapse

Methods inherited from Session

#init, #initialize, #persist!, #renderer, #screen, #tick, #update, #view

Methods included from Actionable

included

Constructor Details

This class inherits a constructor from Fatty::Session

Instance Attribute Details

#winObject

Returns the value of attribute win.



5
6
7
# File 'lib/fatty/session/modal_session.rb', line 5

def win
  @win
end

Instance Method Details

#closeObject

Session Protocol



12
13
14
15
16
17
18
# File 'lib/fatty/session/modal_session.rb', line 12

def close
  Fatty.debug("#{self.class}#close: object_id=#{object_id}", tag: :session)
  old_win = win
  self.win = nil
  safely_close_window(old_win)
  nil
end

#handle_resizeObject



20
21
22
23
# File 'lib/fatty/session/modal_session.rb', line 20

def handle_resize
  rebuild_windows!
  []
end