class HoundListSync::Repositories::GithubOrg::Repo
Public Class Methods
new(raw)
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 18 def initialize(raw) @raw = raw end
Public Instance Methods
anchor()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 55 def anchor "#L{line}" end
base_url()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 51 def base_url "#{@raw["html_url"]}/blob/#{branch}/{path}{anchor}" end
branch()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 47 def branch @raw["default_branch"] || "master" end
indexable?()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 22 def indexable? !@raw["archived"] && !@raw["disabled"] end
name()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 26 def name @raw["full_name"] end
to_config()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 30 def to_config { "url" => url, "url-pattern" => { "base-url" => base_url, "anchor" => anchor }, "vcs-config" => { "ref" => branch } } end
url()
click to toggle source
# File lib/hound_list_sync/repositories/github_org.rb, line 43 def url @raw["ssh_url"] end