class Meshchat::Ui::Command::Config
Public Class Methods
description()
click to toggle source
# File lib/meshchat/ui/command/config.rb, line 6 def self.description 'interface for setting and displaying various config options' end
Public Instance Methods
config_set_args()
click to toggle source
# File lib/meshchat/ui/command/config.rb, line 27 def config_set_args command_args[2..3] end
handle()
click to toggle source
# File lib/meshchat/ui/command/config.rb, line 10 def handle case sub_command when SET if is_valid_set_command? key, value = config_set_args Display.info APP_CONFIG.user.set(key, with: value) else Display.alert 'set requires a key and a value' end when DISPLAY Display.info APP_CONFIG.user.display else Display.alert 'config command not implemented...' end end
is_valid_set_command?()
click to toggle source
# File lib/meshchat/ui/command/config.rb, line 31 def is_valid_set_command? sub_command == SET && command_args.length == 4 end