aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-05-24 16:42:38 -0500
committerJoshua Peek <josh@joshpeek.com>2011-05-24 16:42:38 -0500
commitfc24b959d07d5c706d3ce31fbc16537946a1b263 (patch)
treeb96d7436ad3da2940a156f3c2bfa71c3165393a0 /README.md
parentd889887440167a3a6a61a350d30644fe47277c32 (diff)
Update api example
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 4 insertions, 8 deletions
diff --git a/README.md b/README.md
index 4574320..37ba6ee 100644
--- a/README.md
+++ b/README.md
@@ -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