class Travis::Client::Repository
def branch(name)
def branch(name) attributes['branches'] ||= {} attributes['branches'][name] ||= begin build = attributes['last_on_branch'].detect { |b| b.commit.branch == name.to_s } if attributes['last_on_branch'] build || session.get("/repos/#{id}/branches/#{name}")['branch'] end end