Class: Iterm2TabFormatter::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/iterm2_tab_formatter/controller.rb

Instance Method Summary collapse

Constructor Details

#initialize(colors) ⇒ Controller

Returns a new instance of Controller.



6
7
8
# File 'lib/iterm2_tab_formatter/controller.rb', line 6

def initialize(colors)
  @colors = colors
end

Instance Method Details

#apply_fail_colorObject



14
15
16
# File 'lib/iterm2_tab_formatter/controller.rb', line 14

def apply_fail_color
  Iterm2Escape::Tab.set_color(*@colors.fetch(:spec_fail))
end

#apply_pass_colorObject



18
19
20
# File 'lib/iterm2_tab_formatter/controller.rb', line 18

def apply_pass_color
  Iterm2Escape::Tab.set_color(*@colors.fetch(:suite_pass))
end

#apply_start_colorObject



10
11
12
# File 'lib/iterm2_tab_formatter/controller.rb', line 10

def apply_start_color
  Iterm2Escape::Tab.set_color(*@colors.fetch(:suite_start))
end

#tab_title=(title) ⇒ Object



22
23
24
# File 'lib/iterm2_tab_formatter/controller.rb', line 22

def tab_title=(title)
  Iterm2Escape::Tab.title = title
end

#window_title=(title) ⇒ Object



26
27
28
# File 'lib/iterm2_tab_formatter/controller.rb', line 26

def window_title=(title)
  Iterm2Escape::Tab.window_title = title
end