Method: HighLine.find_or_create_style_list

Defined in:
lib/highline/style.rb

.find_or_create_style_list(*args) ⇒ Style

Find a Style list or create a new one.

Examples:

Creating a Style list of the combined RED and BOLD styles.

style_list = HighLine.find_or_create_style_list(:red, :bold)

Parameters:

  • args (Array<Symbol>)

    an Array of Symbols of each style that will be on the style list.

Returns:



62
63
64
65
# File 'lib/highline/style.rb', line 62

def self.find_or_create_style_list(*args)
  name = args
  Style.list[name] || Style.new(list: args)
end