class Megam::GogsRepo
Public Class Methods
error(response)
click to toggle source
# File lib/megam/core/gogs_repo.rb, line 42 def self.error(response) {:status => response.status, :body => "" } end
list(token)
click to toggle source
# File lib/megam/core/gogs_repo.rb, line 28 def self.list(token) puts "Wait! Will list repos!" megams = Megam::Gogs.new res = megams.get_repos(token) hash = {} if res.status != 200 hash = self.error(res) else hash = self.to_hash(res) end hash end
to_hash(response)
click to toggle source
# File lib/megam/core/gogs_repo.rb, line 20 def self.to_hash(response) puts "Enters to_hash! phew! no error!" puts response.body index_hash = response.body {:status => response.status, :body => index_hash } end
Public Instance Methods
to_s()
click to toggle source
# File lib/megam/core/gogs_repo.rb, line 46 def to_s Megam::Stuff.styled_hash(to_hash) end