module ReadmeScore
Constants
- ROOT
- VERSION
Public Instance Methods
document(url_or_html)
click to toggle source
# File lib/readme-score.rb, line 20 def document(url_or_html) document = nil if Document::Loader.is_url?(url_or_html) document = Document.load(url_or_html) elsif Document::Loader.is_github_repo_slug?(url_or_html) document = Document.load("http://github.com/#{url_or_html}") else document = Document.new(url_or_html) end document end
for(url_or_html)
click to toggle source
# File lib/readme-score.rb, line 16 def for(url_or_html) document(url_or_html).score end
github_api_token()
click to toggle source
# File lib/readme-score.rb, line 44 def github_api_token @github_api_token || ENV['READMESCORE_GITHUB_TOKEN'] end
github_api_token=(github_api_token)
click to toggle source
# File lib/readme-score.rb, line 40 def github_api_token=(github_api_token) @github_api_token = github_api_token end
use_github_api=(use_github_api)
click to toggle source
# File lib/readme-score.rb, line 36 def use_github_api=(use_github_api) @reject_github_api = !use_github_api end
use_github_api?()
click to toggle source
# File lib/readme-score.rb, line 32 def use_github_api? !@reject_github_api end