Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ealdent committed Mar 25, 2010
1 parent f23cc8e commit 15049c7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/tunkrank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ class TunkRank
class << self
def score(twitter_user)
get("/score/#{twitter_user}.json")
rescue
raise TunkRankError, "Unable to fetch score for #{twitter_user}."
end

def raw_score(twitter_user)
score(twitter_user)['raw_tunkrank_score']
rescue
raise TunkRankError, "Score not calculated for #{twitter_user}."
score(twitter_user)['twitter_user']['raw_tunkrank_score']
end

def ranking(twitter_user)
score(twitter_user)['ranking']
rescue
raise TunkRankError, "Score not calculated for #{twitter_user}."
score(twitter_user)['twitter_user']['ranking']
end

def refresh(twitter_user)
Expand Down

0 comments on commit 15049c7

Please sign in to comment.