Class: SublimePS::CommandLineInterface

Inherits:
Thor
  • Object
show all
Defined in:
lib/sublime_ps.rb

Instance Method Summary collapse

Instance Method Details

#apply_preset(preset_name) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/sublime_ps.rb', line 21

def apply_preset(preset_name)
  preset_content      = FilesManipulation::Preset.file_content(preset_name)
  sublime_preferences = FilesManipulation::SublimePreferences.new
  preferences_content = sublime_preferences.file_content
  preferences_content.merge!(preset_content)
  sublime_preferences.set_content(preferences_content)
  puts "Preferences changed to preset '#{preset_name}' \e[32m[OK]\e[0m"
end