Class: Rbnotes::Commands::Builtins::Conf

Inherits:
Command
  • Object
show all
Defined in:
lib/rbnotes/commands.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



145
146
147
# File 'lib/rbnotes/commands.rb', line 145

def description
  "Print the current configuration"
end

#execute(_, conf) ⇒ Object



149
150
151
152
153
# File 'lib/rbnotes/commands.rb', line 149

def execute(_, conf)
  conf.keys.sort.each { |k|
    puts "#{k}=#{conf[k]}"
  }
end

#helpObject



155
156
157
158
159
160
161
162
# File 'lib/rbnotes/commands.rb', line 155

def help
  puts <<CONF
usage:
    #{Rbnotes::NAME} conf

Print the current configuration values.
CONF
end