Class: RubyEdit::Commands::Configure
- Inherits:
-
Object
- Object
- RubyEdit::Commands::Configure
- Defined in:
- lib/ruby_edit/commands/configure.rb
Constant Summary collapse
- CONFIGURATIONS =
%i[editor grep_options].freeze
Instance Method Summary collapse
- #execute(output: $stdout) ⇒ Object
-
#initialize(options) ⇒ Configure
constructor
A new instance of Configure.
Constructor Details
#initialize(options) ⇒ Configure
Returns a new instance of Configure.
10 11 12 |
# File 'lib/ruby_edit/commands/configure.rb', line 10 def initialize() @options = end |
Instance Method Details
#execute(output: $stdout) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby_edit/commands/configure.rb', line 14 def execute(output: $stdout) .each do |key, val| if val == key.to_s output.puts RubyEdit.config.send(key) else RubyEdit.config.send("#{key}=", val) output.puts "#{key.to_s.titleize} changed to #{val}" end end end |