Class: Yildun::Tab

Inherits:
Object
  • Object
show all
Defined in:
lib/yildun/tab.rb,
sig/yildun.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Returns:



5
6
7
# File 'lib/yildun/tab.rb', line 5

def terminal
  @terminal
end

#title ⇒ String (readonly)

Returns the value of attribute title.

Returns:

  • (String)


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