class MarkdownRubyDocumentation::GitHubProject
Public Class Methods
branch()
click to toggle source
# File lib/markdown_ruby_documentation/git_hub_project.rb, line 20 def branch @branch || current_branch end
current_branch()
click to toggle source
# File lib/markdown_ruby_documentation/git_hub_project.rb, line 24 def current_branch `git rev-parse --abbrev-ref HEAD`.chomp end
git_url()
click to toggle source
# File lib/markdown_ruby_documentation/git_hub_project.rb, line 4 def git_url `git config --get remote.origin.url`.chomp end
root_path()
click to toggle source
# File lib/markdown_ruby_documentation/git_hub_project.rb, line 12 def root_path `git rev-parse --show-toplevel`.chomp end
set_branch(branch)
click to toggle source
# File lib/markdown_ruby_documentation/git_hub_project.rb, line 16 def set_branch(branch) @branch = branch end
url()
click to toggle source
# File lib/markdown_ruby_documentation/git_hub_project.rb, line 8 def url "https://github.com/#{git_url.split(":").last.gsub(".git", "")}".chomp end