Skip to content

Instantly share code, notes, and snippets.

@epitron
Created January 10, 2012 03:28
Show Gist options
  • Save epitron/1586707 to your computer and use it in GitHub Desktop.
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.
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