We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature thoughts:
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
The text was updated successfully, but these errors were encountered:
Changed my mind on this, I think it's unlikely to be used
Sorry, something went wrong.
No branches or pull requests
Feature thoughts:
Diff: https://gist.github.com/88f890540376794559ab
The text was updated successfully, but these errors were encountered: