Created
January 10, 2012 03:28
-
-
Save epitron/1586707 to your computer and use it in GitHub Desktop.
An example of a non-class-based way of sticking metadata onto a command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pry.plugin("something") do | |
command "amazing" do | |
... | |
end.help do | |
short "blah" | |
long "A long description." | |
end | |
command /more-amazing!*/ do | |
... | |
end.help( | |
:short => "Blah", | |
:long => "Wheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!", | |
:example => %{ | |
Doodley-doo... | |
1,2,3,4 | |
Wakkawakka! | |
} | |
) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment