Permalink
Browse files

Small refactoring in EncodeCommand

  • Loading branch information...
1 parent 5ce7a8a commit 928fa6e40a1949ecfd2d4c0ea08f974ff9bbc96c @aef committed Aug 8, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/aef/linebreak/commands/encode.rb
@@ -38,10 +38,10 @@ def add_sources(builder)
# Define configuration options
def add_choices(builder)
- output_values = Aef::Linebreak::BREAK_BY_SYSTEM.keys.map{|key| key.to_s}
- builder.add_choice(:system, :default => 'unix', :type => output_values) do |cli|
+ systems = Aef::Linebreak::BREAK_BY_SYSTEM.keys.map{|key| key.to_s}
+ builder.add_choice(:system, :default => 'unix', :type => systems) do |cli|
cli.uses_option('-s', '--system SYSTEM',
- "Output encoding system. Possible settings: #{Aef::Linebreak::BREAK_BY_SYSTEM.keys.join(', ')}")
+ "Output encoding system. Possible settings: #{systems.join(', ')}")
end
builder.add_choice(:files, :length => 0..2, :type => :pathname) {|cli| cli.uses_arglist}

0 comments on commit 928fa6e

Please sign in to comment.