module CLI::UI::Frame::FrameStyle

Public Class Methods

extended(base) click to toggle source
# File lib/cli/ui/frame/frame_style.rb, line 26
def extended(base)
  @@loaded_styles << base
  base.extend(Interface)
end
loaded_styles() click to toggle source
# File lib/cli/ui/frame/frame_style.rb, line 11
def loaded_styles
  @@loaded_styles.map(&:name)
end
lookup(name) click to toggle source

Lookup a frame style via its name

Attributes

  • symbol - frame style name to lookup

# File lib/cli/ui/frame/frame_style.rb, line 20
def lookup(name)
  @@loaded_styles
    .find { |style| style.name.to_sym == name }
    .tap  { |style| raise InvalidFrameStyleName, name if style.nil? }
end