Class: Ledmon::CLI::Config
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.config_value(name, description: nil) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/ledmon/cli/config.rb', line 3 def self.config_value(name, description: nil) desc "#{name} [VALUE]", description || "Read or set #{name} value" define_method(name) do |value = nil| if value puts Ledmon::Config.public_send(:"#{name}=", value) else puts Ledmon::Config.public_send(name.to_sym) end end end |