class MenuCommander::MenuOptions
Attributes
options[R]
Public Class Methods
new(options)
click to toggle source
# File lib/menu_commander/menu_options.rb, line 5 def initialize(options) options ||= {} options.transform_keys! &:to_sym @options = default_options.merge options end
Public Instance Methods
default_options()
click to toggle source
# File lib/menu_commander/menu_options.rb, line 11 def default_options @default_options ||= { auto_select: true, echo: false, echo_marker_success: '✓', echo_marker_error: '✗', filter: 'auto', header: false, page_size: 10, select_marker: "⯈", submenu_marker: " ⯆", title_marker: "▌", # ➤ ❚ ✚ } end
method_missing(method, *_args, &_block)
click to toggle source
Calls superclass method
# File lib/menu_commander/menu_options.rb, line 26 def method_missing(method, *_args, &_block) respond_to?(method) ? options[method] : super end
respond_to_missing?(method_name, include_private=false)
click to toggle source
Calls superclass method
# File lib/menu_commander/menu_options.rb, line 30 def respond_to_missing?(method_name, include_private=false) options.has_key?(method_name) || super end