Class: Yildun::Tab
- Inherits:
-
Object
- Object
- Yildun::Tab
- Defined in:
- lib/yildun/tab.rb,
sig/yildun.rbs
Instance Attribute Summary collapse
-
#terminal ⇒ Terminal
readonly
Returns the value of attribute terminal.
-
#title ⇒ String
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(terminal, title: nil) ⇒ Tab
constructor
A new instance of Tab.
Constructor Details
#initialize(terminal, title: nil) ⇒ Tab
Returns a new instance of Tab.
7 8 9 |
# File 'lib/yildun/tab.rb', line 7 def initialize(terminal, title: nil) @terminal, @title = terminal, (title || terminal.cwd) end |
Instance Attribute Details
#terminal ⇒ Terminal (readonly)
Returns the value of attribute terminal.
5 6 7 |
# File 'lib/yildun/tab.rb', line 5 def terminal @terminal end |
#title ⇒ String (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/yildun/tab.rb', line 5 def title @title end |
Instance Method Details
#close ⇒ Object
11 |
# File 'lib/yildun/tab.rb', line 11 def close = @terminal.close |