Method: HighLine::Style.clear_index

Defined in:
lib/highline/style.rb

.clear_indexvoid

This method returns an undefined value.

Clear all custom Styles, restoring the Style index to builtin styles only.



92
93
94
95
96
97
# File 'lib/highline/style.rb', line 92

def self.clear_index
  # reset to builtin only styles
  @styles = list.select { |_name, style| style.builtin }
  @code_index = {}
  @styles.each_value { |style| index(style) }
end