Class: Legion::TTY::Screens::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/legion/tty/screens/base.rb

Direct Known Subclasses

Chat, Dashboard, Onboarding

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'lib/legion/tty/screens/base.rb', line 9

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



7
8
9
# File 'lib/legion/tty/screens/base.rb', line 7

def app
  @app
end

Instance Method Details

#activateObject



13
# File 'lib/legion/tty/screens/base.rb', line 13

def activate; end

#deactivateObject



14
# File 'lib/legion/tty/screens/base.rb', line 14

def deactivate; end

#handle_input(_key) ⇒ Object



20
21
22
# File 'lib/legion/tty/screens/base.rb', line 20

def handle_input(_key)
  :pass
end

#render(_width, _height) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/legion/tty/screens/base.rb', line 16

def render(_width, _height)
  raise NotImplementedError, "#{self.class}#render must be implemented"
end

#teardownObject



24
# File 'lib/legion/tty/screens/base.rb', line 24

def teardown; end