PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/highline-2.1.0/lib/highline/menu/ |
| Server: Linux server1.ngambekcore.com 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 04:00:07 EDT 2025 x86_64 IP: 159.198.77.92 |
| Dir : //opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/highline-2.1.0/lib/highline/menu/item.rb |
# encoding: utf-8
class HighLine
class Menu < Question
# Represents an Item of a HighLine::Menu.
#
class Item
attr_reader :name, :text, :help, :action
#
# @param name [String] The name that is matched against the user input
# @param attributes [Hash] options Hash to tailor menu item to your needs
# @option attributes text: [String] The text that displays for that
# choice (defaults to name)
# @option attributes help: [String] help/hint string to be displayed.
# @option attributes action: [Block] a block that gets called when choice
# is selected
#
def initialize(name, attributes)
@name = name
@text = attributes[:text] || @name
@help = attributes[:help]
@action = attributes[:action]
end
def item_help
return {} unless help
{ name.to_s.downcase => help }
end
end
end
end