class HighLine::Menu
def layout=(new_layout)
:inline.
will default to :none and _flow_ will default to
If set to either :one_line, or :menu_only, _index_
context so each method is properly delegated.
otherwise evaluated in the TemplateRenderer
menu and prompt, but is
String can access header,
any ERb String:: Will be taken as the literal _layout_. This
short _prompt_.
:menu_only:: Just the menu items, followed up by a likely
items between trailing parenthesis.
colon and spaces, then the _prompt_ with menu
The _header_ comes first followed by a
:one_line:: A shorter _layout_ that fits on one line.
will be used as the ask()-like question.
items will follow. Finally, the _prompt_
a trailing colon. Then the list of menu
will appear at the top on its own line with
:list:: The default _layout_. The _header_ if set
Accepted settings for _layout_ are:
configuration block, if needed.
account for that, you probably want to set a _layout_ first in your
of the Menu object, to ideal defaults for the chosen _layout_. To
Setting a _layout_ with this method also adjusts some other attributes
def layout=(new_layout) @layout = new_layout # Default settings. case @layout when :one_line, :menu_only self.index = :none @flow = :inline end end