class HighLine::Menu
def index=(style)
Because of this, you should make a habit of setting the _index_ first.
_index_suffix_ to a single space and _select_by_ to :name.
Setting the _index_ to :none or a literal String also adjusts
any String:: Will be used as the literal _index_.
:none:: No index will be appended to menu items.
with a.
:letter:: Items will be indexed alphabetically, starting
with 1. This is the default method of indexing.
:number:: Menu items will be indexed numerically, starting
menu items, when displayed in list form. The available settings are:
Sets the indexing style for this Menu object. Indexes are appended to
def index=(style) @index = style return unless @index == :none || @index.is_a?(::String) # Default settings. @index_suffix = " " @select_by = :name end