class Hackmac::OC

def initialize(config:)

def initialize(config:)
  @config = config
end

def inspect

def inspect
  "#<#{self.class}: #{to_s}>"
end

def name

def name
  remote.name
end

def remote

def remote
  @remote and return @remote
  source = @config.oc.source
  github = source.github
  auth = [ @config.github.user, @config.github.access_token ].compact
  auth.empty? and auth = nil
  suffix =
    case debug = source.debug?
    when true       then 'DEBUG'
    when false      then 'RELEASE'
    when nil        then nil
    end
  @remote = Hackmac::GithubSource.new(github, auth: auth, suffix: suffix)
end

def to_s

def to_s
  "#{name} #{version}"
end

def version

def version
  remote.version
end