Skip to content

Commit

Permalink
Add script/console for experimentation from Ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Aug 6, 2014
1 parent 2c58377 commit 680d1bc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions script/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e

public_methods() {
sed '/^ *private/,$d' "$1" | grep -w def | sed -E 's/^ *def / /; s/).+/)/'
}

echo "Emoji methods:"
public_methods lib/emoji.rb
echo
echo "Emoji::Character methods:"
public_methods lib/emoji/character.rb
echo

exec irb -I lib -r emoji

0 comments on commit 680d1bc

Please sign in to comment.