injekt/slop — Issue #32: Slop::Optionize
Author: injekt
Created: 2011-11-06 00:45:44+00:00
State: open
Labels: feature

Feature thoughts:

```ruby
require 'slop'

class User
include Slop::Optionize

option :n, :name=, 'Your name'
option :a, :age=, 'Your age', :as => :int

def birthday_year
Time.now.year - options[:age]
end

end

u = User.new
u.parse_options %w[--name lee --age 346]
p u.birthday_year #=> 1665
```

Diff: https://gist.github.com/88f890540376794559ab