Class: Marlens::GithubToJiraComment::GithubUrl::Source
- Inherits:
-
Struct
- Object
- Struct
- Marlens::GithubToJiraComment::GithubUrl::Source
- Defined in:
- lib/marlens/github_to_jira_comment/github_url.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#repo ⇒ Object
Returns the value of attribute repo.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number
8 9 10 |
# File 'lib/marlens/github_to_jira_comment/github_url.rb', line 8 def number @number end |
#owner ⇒ Object
Returns the value of attribute owner
8 9 10 |
# File 'lib/marlens/github_to_jira_comment/github_url.rb', line 8 def owner @owner end |
#repo ⇒ Object
Returns the value of attribute repo
8 9 10 |
# File 'lib/marlens/github_to_jira_comment/github_url.rb', line 8 def repo @repo end |
#type ⇒ Object
Returns the value of attribute type
8 9 10 |
# File 'lib/marlens/github_to_jira_comment/github_url.rb', line 8 def type @type end |
Instance Method Details
#api_path ⇒ Object
9 10 11 12 |
# File 'lib/marlens/github_to_jira_comment/github_url.rb', line 9 def api_path collection = type == "pull" ? "pulls" : "issues" "/repos/#{owner}/#{repo}/#{collection}/#{number}" end |
#context ⇒ Object
14 15 16 |
# File 'lib/marlens/github_to_jira_comment/github_url.rb', line 14 def context "#{owner}/#{repo}" end |