class Travis::Client::Account
def self.cast_id(id)
def self.cast_id(id) String(id) end
def self.id?(object)
def self.id?(object) object.is_a? String end
def education
def education load_attribute('education') { false } if member? end
def load_attribute(name, &block)
def load_attribute(name, &block) session.accounts if missing? name block ? attributes.fetch(name.to_s, &block) : attributes[name.to_s] end
def member?
def member? session.accounts.include? self end
def on_trial?
def on_trial? !subscribed? and !education? end
def repos_count
def repos_count load_attribute("repos_count") { repositories.count } end
def repositories
def repositories attributes['repositories'] ||= session.repos(:owner_name => login) end
def subscribed
def subscribed load_attribute('subscribed') { true } if member? end