Class: PryTheme::WhenStartedHook

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-theme/when_started_hook.rb

Instance Method Summary collapse

Instance Method Details

#call(target, options, _pry_) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/pry-theme/when_started_hook.rb', line 3

def call(target, options, _pry_)
  recreate_user_themes_from_default_ones
  load_themes

  if File.exist?(theme_file)
    ThemeList.activate_theme(Pry.config.theme)
  else
    display_warning(_pry_) if Pry.config.theme
    ThemeList.activate_theme_intelligently
  end

  apply_config
end