Skip to content

Commit

Permalink
Small refactoring in EncodeCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
aef committed Aug 8, 2009
1 parent 5ce7a8a commit 928fa6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/aef/linebreak/commands/encode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 928fa6e

Please sign in to comment.