Class: Ghub::Models::Repository
- Inherits:
-
Struct
- Object
- Struct
- Ghub::Models::Repository
- Defined in:
- lib/ghub/models/repository.rb
Overview
Defines a repository.
Instance Attribute Summary collapse
-
#allow_forking ⇒ Object
Returns the value of attribute allow_forking.
-
#archive_url ⇒ Object
Returns the value of attribute archive_url.
-
#archived ⇒ Object
Returns the value of attribute archived.
-
#assignees_url ⇒ Object
Returns the value of attribute assignees_url.
-
#blobs_url ⇒ Object
Returns the value of attribute blobs_url.
-
#branches_url ⇒ Object
Returns the value of attribute branches_url.
-
#clone_url ⇒ Object
Returns the value of attribute clone_url.
-
#collaborators_url ⇒ Object
Returns the value of attribute collaborators_url.
-
#comments_url ⇒ Object
Returns the value of attribute comments_url.
-
#commits_url ⇒ Object
Returns the value of attribute commits_url.
-
#compare_url ⇒ Object
Returns the value of attribute compare_url.
-
#contents_url ⇒ Object
Returns the value of attribute contents_url.
-
#contributors_url ⇒ Object
Returns the value of attribute contributors_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#default_branch ⇒ Object
Returns the value of attribute default_branch.
-
#deployments_url ⇒ Object
Returns the value of attribute deployments_url.
-
#description ⇒ Object
Returns the value of attribute description.
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#downloads_url ⇒ Object
Returns the value of attribute downloads_url.
-
#events_url ⇒ Object
Returns the value of attribute events_url.
-
#fork ⇒ Object
Returns the value of attribute fork.
-
#forks ⇒ Object
Returns the value of attribute forks.
-
#forks_count ⇒ Object
Returns the value of attribute forks_count.
-
#forks_url ⇒ Object
Returns the value of attribute forks_url.
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#git_commits_url ⇒ Object
Returns the value of attribute git_commits_url.
-
#git_refs_url ⇒ Object
Returns the value of attribute git_refs_url.
-
#git_tags_url ⇒ Object
Returns the value of attribute git_tags_url.
-
#git_url ⇒ Object
Returns the value of attribute git_url.
-
#has_downloads ⇒ Object
Returns the value of attribute has_downloads.
-
#has_issues ⇒ Object
Returns the value of attribute has_issues.
-
#has_pages ⇒ Object
Returns the value of attribute has_pages.
-
#has_projects ⇒ Object
Returns the value of attribute has_projects.
-
#has_wiki ⇒ Object
Returns the value of attribute has_wiki.
-
#homepage ⇒ Object
Returns the value of attribute homepage.
-
#hooks_url ⇒ Object
Returns the value of attribute hooks_url.
-
#html_url ⇒ Object
Returns the value of attribute html_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_template ⇒ Object
Returns the value of attribute is_template.
-
#issue_comment_url ⇒ Object
Returns the value of attribute issue_comment_url.
-
#issue_events_url ⇒ Object
Returns the value of attribute issue_events_url.
-
#issues_url ⇒ Object
Returns the value of attribute issues_url.
-
#keys_url ⇒ Object
Returns the value of attribute keys_url.
-
#labels_url ⇒ Object
Returns the value of attribute labels_url.
-
#language ⇒ Object
Returns the value of attribute language.
-
#languages_url ⇒ Object
Returns the value of attribute languages_url.
-
#license ⇒ Object
Returns the value of attribute license.
-
#merges_url ⇒ Object
Returns the value of attribute merges_url.
-
#milestones_url ⇒ Object
Returns the value of attribute milestones_url.
-
#mirror_url ⇒ Object
Returns the value of attribute mirror_url.
-
#name ⇒ Object
Returns the value of attribute name.
-
#network_count ⇒ Object
Returns the value of attribute network_count.
-
#node_id ⇒ Object
Returns the value of attribute node_id.
-
#notifications_url ⇒ Object
Returns the value of attribute notifications_url.
-
#open_issues ⇒ Object
Returns the value of attribute open_issues.
-
#open_issues_count ⇒ Object
Returns the value of attribute open_issues_count.
-
#organization ⇒ Object
Returns the value of attribute organization.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#private ⇒ Object
Returns the value of attribute private.
-
#pulls_url ⇒ Object
Returns the value of attribute pulls_url.
-
#pushed_at ⇒ Object
Returns the value of attribute pushed_at.
-
#releases_url ⇒ Object
Returns the value of attribute releases_url.
-
#ssh_url ⇒ Object
Returns the value of attribute ssh_url.
-
#stargazers_count ⇒ Object
Returns the value of attribute stargazers_count.
-
#stargazers_url ⇒ Object
Returns the value of attribute stargazers_url.
-
#statuses_url ⇒ Object
Returns the value of attribute statuses_url.
-
#subscribers_count ⇒ Object
Returns the value of attribute subscribers_count.
-
#subscribers_url ⇒ Object
Returns the value of attribute subscribers_url.
-
#subscription_url ⇒ Object
Returns the value of attribute subscription_url.
-
#svn_url ⇒ Object
Returns the value of attribute svn_url.
-
#tags_url ⇒ Object
Returns the value of attribute tags_url.
-
#teams_url ⇒ Object
Returns the value of attribute teams_url.
-
#temp_clone_token ⇒ Object
Returns the value of attribute temp_clone_token.
-
#topics ⇒ Object
Returns the value of attribute topics.
-
#trees_url ⇒ Object
Returns the value of attribute trees_url.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
-
#watchers ⇒ Object
Returns the value of attribute watchers.
-
#watchers_count ⇒ Object
Returns the value of attribute watchers_count.
-
#web_commit_signoff_required ⇒ Object
Returns the value of attribute web_commit_signoff_required.
-
#weight ⇒ Object
Returns the value of attribute weight.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Repository
constructor
A new instance of Repository.
Constructor Details
#initialize ⇒ Repository
Returns a new instance of Repository.
103 104 105 106 |
# File 'lib/ghub/models/repository.rb', line 103 def initialize(**) super freeze end |
Instance Attribute Details
#allow_forking ⇒ Object
Returns the value of attribute allow_forking
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def allow_forking @allow_forking end |
#archive_url ⇒ Object
Returns the value of attribute archive_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def archive_url @archive_url end |
#archived ⇒ Object
Returns the value of attribute archived
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def archived @archived end |
#assignees_url ⇒ Object
Returns the value of attribute assignees_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def assignees_url @assignees_url end |
#blobs_url ⇒ Object
Returns the value of attribute blobs_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def blobs_url @blobs_url end |
#branches_url ⇒ Object
Returns the value of attribute branches_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def branches_url @branches_url end |
#clone_url ⇒ Object
Returns the value of attribute clone_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def clone_url @clone_url end |
#collaborators_url ⇒ Object
Returns the value of attribute collaborators_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def collaborators_url @collaborators_url end |
#comments_url ⇒ Object
Returns the value of attribute comments_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def comments_url @comments_url end |
#commits_url ⇒ Object
Returns the value of attribute commits_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def commits_url @commits_url end |
#compare_url ⇒ Object
Returns the value of attribute compare_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def compare_url @compare_url end |
#contents_url ⇒ Object
Returns the value of attribute contents_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def contents_url @contents_url end |
#contributors_url ⇒ Object
Returns the value of attribute contributors_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def contributors_url @contributors_url end |
#created_at ⇒ Object
Returns the value of attribute created_at
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def created_at @created_at end |
#default_branch ⇒ Object
Returns the value of attribute default_branch
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def default_branch @default_branch end |
#deployments_url ⇒ Object
Returns the value of attribute deployments_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def deployments_url @deployments_url end |
#description ⇒ Object
Returns the value of attribute description
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def description @description end |
#disabled ⇒ Object
Returns the value of attribute disabled
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def disabled @disabled end |
#downloads_url ⇒ Object
Returns the value of attribute downloads_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def downloads_url @downloads_url end |
#events_url ⇒ Object
Returns the value of attribute events_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def events_url @events_url end |
#fork ⇒ Object
Returns the value of attribute fork
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def fork @fork end |
#forks ⇒ Object
Returns the value of attribute forks
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def forks @forks end |
#forks_count ⇒ Object
Returns the value of attribute forks_count
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def forks_count @forks_count end |
#forks_url ⇒ Object
Returns the value of attribute forks_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def forks_url @forks_url end |
#full_name ⇒ Object
Returns the value of attribute full_name
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def full_name @full_name end |
#git_commits_url ⇒ Object
Returns the value of attribute git_commits_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def git_commits_url @git_commits_url end |
#git_refs_url ⇒ Object
Returns the value of attribute git_refs_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def git_refs_url @git_refs_url end |
#git_tags_url ⇒ Object
Returns the value of attribute git_tags_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def @git_tags_url end |
#git_url ⇒ Object
Returns the value of attribute git_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def git_url @git_url end |
#has_downloads ⇒ Object
Returns the value of attribute has_downloads
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def has_downloads @has_downloads end |
#has_issues ⇒ Object
Returns the value of attribute has_issues
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def has_issues @has_issues end |
#has_pages ⇒ Object
Returns the value of attribute has_pages
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def has_pages @has_pages end |
#has_projects ⇒ Object
Returns the value of attribute has_projects
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def has_projects @has_projects end |
#has_wiki ⇒ Object
Returns the value of attribute has_wiki
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def has_wiki @has_wiki end |
#homepage ⇒ Object
Returns the value of attribute homepage
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def homepage @homepage end |
#hooks_url ⇒ Object
Returns the value of attribute hooks_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def hooks_url @hooks_url end |
#html_url ⇒ Object
Returns the value of attribute html_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def html_url @html_url end |
#id ⇒ Object
Returns the value of attribute id
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def id @id end |
#is_template ⇒ Object
Returns the value of attribute is_template
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def is_template @is_template end |
#issue_comment_url ⇒ Object
Returns the value of attribute issue_comment_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def issue_comment_url @issue_comment_url end |
#issue_events_url ⇒ Object
Returns the value of attribute issue_events_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def issue_events_url @issue_events_url end |
#issues_url ⇒ Object
Returns the value of attribute issues_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def issues_url @issues_url end |
#keys_url ⇒ Object
Returns the value of attribute keys_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def keys_url @keys_url end |
#labels_url ⇒ Object
Returns the value of attribute labels_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def labels_url @labels_url end |
#language ⇒ Object
Returns the value of attribute language
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def language @language end |
#languages_url ⇒ Object
Returns the value of attribute languages_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def languages_url @languages_url end |
#license ⇒ Object
Returns the value of attribute license
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def license @license end |
#merges_url ⇒ Object
Returns the value of attribute merges_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def merges_url @merges_url end |
#milestones_url ⇒ Object
Returns the value of attribute milestones_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def milestones_url @milestones_url end |
#mirror_url ⇒ Object
Returns the value of attribute mirror_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def mirror_url @mirror_url end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def name @name end |
#network_count ⇒ Object
Returns the value of attribute network_count
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def network_count @network_count end |
#node_id ⇒ Object
Returns the value of attribute node_id
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def node_id @node_id end |
#notifications_url ⇒ Object
Returns the value of attribute notifications_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def notifications_url @notifications_url end |
#open_issues ⇒ Object
Returns the value of attribute open_issues
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def open_issues @open_issues end |
#open_issues_count ⇒ Object
Returns the value of attribute open_issues_count
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def open_issues_count @open_issues_count end |
#organization ⇒ Object
Returns the value of attribute organization
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def organization @organization end |
#owner ⇒ Object
Returns the value of attribute owner
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def owner @owner end |
#permissions ⇒ Object
Returns the value of attribute permissions
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def @permissions end |
#private ⇒ Object
Returns the value of attribute private
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def private @private end |
#pulls_url ⇒ Object
Returns the value of attribute pulls_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def pulls_url @pulls_url end |
#pushed_at ⇒ Object
Returns the value of attribute pushed_at
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def pushed_at @pushed_at end |
#releases_url ⇒ Object
Returns the value of attribute releases_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def releases_url @releases_url end |
#ssh_url ⇒ Object
Returns the value of attribute ssh_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def ssh_url @ssh_url end |
#stargazers_count ⇒ Object
Returns the value of attribute stargazers_count
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def stargazers_count @stargazers_count end |
#stargazers_url ⇒ Object
Returns the value of attribute stargazers_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def stargazers_url @stargazers_url end |
#statuses_url ⇒ Object
Returns the value of attribute statuses_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def statuses_url @statuses_url end |
#subscribers_count ⇒ Object
Returns the value of attribute subscribers_count
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def subscribers_count @subscribers_count end |
#subscribers_url ⇒ Object
Returns the value of attribute subscribers_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def subscribers_url @subscribers_url end |
#subscription_url ⇒ Object
Returns the value of attribute subscription_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def subscription_url @subscription_url end |
#svn_url ⇒ Object
Returns the value of attribute svn_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def svn_url @svn_url end |
#tags_url ⇒ Object
Returns the value of attribute tags_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def @tags_url end |
#teams_url ⇒ Object
Returns the value of attribute teams_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def teams_url @teams_url end |
#temp_clone_token ⇒ Object
Returns the value of attribute temp_clone_token
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def temp_clone_token @temp_clone_token end |
#topics ⇒ Object
Returns the value of attribute topics
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def topics @topics end |
#trees_url ⇒ Object
Returns the value of attribute trees_url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def trees_url @trees_url end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def url @url end |
#visibility ⇒ Object
Returns the value of attribute visibility
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def visibility @visibility end |
#watchers ⇒ Object
Returns the value of attribute watchers
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def watchers @watchers end |
#watchers_count ⇒ Object
Returns the value of attribute watchers_count
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def watchers_count @watchers_count end |
#web_commit_signoff_required ⇒ Object
Returns the value of attribute web_commit_signoff_required
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def web_commit_signoff_required @web_commit_signoff_required end |
#weight ⇒ Object
Returns the value of attribute weight
6 7 8 |
# File 'lib/ghub/models/repository.rb', line 6 def weight @weight end |
Class Method Details
.for(**attributes) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/ghub/models/repository.rb', line 91 def self.for(**attributes) new( **attributes.transform_keys!(size: :weight), license: (License[**Hash(attributes[:license])] if attributes.key? :license), owner: User[**attributes[:owner]], organization: (User[**attributes[:organization]] if attributes.key? :organization), permissions: ( Permissions::Repository[**attributes[:permissions]] if attributes.key? :permissions ) ) end |