Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p IO
- .read(File.expand_path("~/.umbrella/bin/README.md"))
- .lines
- .chunk{|x| (x[/^-/] && :dash) || :nondash }
- .sort
- .map{|(k,v)| [k,v.length]}
- .reduce({}){|o,(k,l)| o.update({k=>o.fetch(k,0)+l})}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement