Permalink
Browse files

Add an example to the README.

  • Loading branch information...
1 parent 5745dcd commit 1764870c4d5c39734a23f5b54696187cd1b6af63 Matt Colyer committed Nov 2, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.md
View
11 README.md
@@ -37,6 +37,17 @@ An example YAML file:
Note: codepoints should only include normalized unicode codepoints.
+## Example
+
+ require 'rubygems'
+ require 'speakeasy'
+
+ Speakeasy::Language.supported_language_ids.each do |id|
+ language = Speakeasy::Language.new(id)
+ puts "#{language.anglicized_name} (#{language.native_name})"
+ puts language.codepoints[0..10].inspect
+ end
+
## Contributing
* Fork speakeasy

1 comment on commit 1764870

@rcarver

Beyond making this example read better, does it make sense to provide Speakeasy::Language#each ?

  • Why only output the first 10 codepoints?
  • Can you add example output too?
Please sign in to comment.