Class: Fatty::InputSession
- Defined in:
- lib/fatty/session/input_session.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Attributes inherited from Session
#counter, #keymap, #terminal, #views
Instance Method Summary collapse
-
#initialize(field:, keymap:, views: [], on_accept: nil) ⇒ InputSession
constructor
A new instance of InputSession.
-
#keymap_contexts ⇒ Object
Framework and Session Hooks.
Methods inherited from Session
#add_view, #close, #handle_resize, #init, #inspect, #persist!, #resolve_action, #tick, #update, #view
Methods included from Actionable
Constructor Details
#initialize(field:, keymap:, views: [], on_accept: nil) ⇒ InputSession
Returns a new instance of InputSession.
8 9 10 11 12 |
# File 'lib/fatty/session/input_session.rb', line 8 def initialize(field:, keymap:, views: [], on_accept: nil) super(keymap: keymap, views: views) @field = field @on_accept = on_accept end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
5 6 7 |
# File 'lib/fatty/session/input_session.rb', line 5 def field @field end |
Instance Method Details
#keymap_contexts ⇒ Object
Framework and Session Hooks
18 19 20 21 22 23 24 |
# File 'lib/fatty/session/input_session.rb', line 18 def keymap_contexts if paging_mode? [:paging, :text, :terminal] else [:text, :terminal] end end |