Sha256: 38c097a7b271a8d11a2c917d7b46bdbacc7b55b8d1446a28af49390700527960
Contents?: true
Size: 749 Bytes
Versions: 2
Compression:
Stored size: 749 Bytes
Contents
module GithubIssueRequest class Url GITHUB_BASE_URL = "https://github.com" class << self def config(owner, repo) @@owner = owner @@repo = repo end end # @param [Hash] options # @return [GithubIssueRequest::Url] def initialize(options = {}) _options = options.dup owner = _options.delete(:owner) repo = _options.delete(:repo) @owner = owner || @@owner @repo = repo || @@repo @options = _options raise NotSetOwnerRepoError if @owner.nil? || @repo.nil? @url = "#{GITHUB_BASE_URL}/#{@owner}/#{@repo}/issues/new" @url += "?#{@options.to_query}" unless _options.empty? end # @return [String] def to_s @url end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
github_issue_request-0.1.0 | lib/github_issue_request/url.rb |
github_issue_request-0.0.2 | lib/github_issue_request/url.rb |