diff options
| author | Joshua Peek <josh@joshpeek.com> | 2011-05-24 16:42:38 -0500 |
|---|---|---|
| committer | Joshua Peek <josh@joshpeek.com> | 2011-05-24 16:42:38 -0500 |
| commit | fc24b959d07d5c706d3ce31fbc16537946a1b263 (patch) | |
| tree | b96d7436ad3da2940a156f3c2bfa71c3165393a0 /README.md | |
| parent | d889887440167a3a6a61a350d30644fe47277c32 (diff) | |
Update api example
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -30,19 +30,15 @@ Features Usage ----- - file = Linguist::SourceFile.new("linguist.rb") + file = Linguist::Blob.new("linguist.rb") file.language.name #=> "Ruby" - file = Linguist::SourceFile.new("linguist.gem") + file = Linguist::Blob.new("linguist.gem") file.binary? #=> true - project = Linguist::Project.new(".") + project = Linguist::Repository.new(".") project.language.name #=> "Ruby" - project.language_stats #=> { "Ruby" => 0.98, "Shell" => 0.02 } - - # Using Grit backend - repo = Grit::Repo.new("./.git") - project = Linguist::Project.new(repo) + project.languages #=> { "Ruby" => 0.98, "Shell" => 0.02 } Contributing |
