Class: Gitomator::GitHub::Model::HostedRepo

Inherits:
Object
  • Object
show all
Defined in:
lib/gitomator/github/model/hosted_repo.rb

Instance Method Summary collapse

Constructor Details

#initialize(gh_repo) ⇒ HostedRepo

Returns a new instance of HostedRepo.

Parameters:

  • gh_repo (Sawyer::Resource)


10
11
12
# File 'lib/gitomator/github/model/hosted_repo.rb', line 10

def initialize(gh_repo)
  @r = gh_repo
end

Instance Method Details

#full_nameObject



19
20
21
# File 'lib/gitomator/github/model/hosted_repo.rb', line 19

def full_name
  @r.full_name
end

#nameObject



15
16
17
# File 'lib/gitomator/github/model/hosted_repo.rb', line 15

def name
  @r.name
end

#propertiesObject



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/gitomator/github/model/hosted_repo.rb', line 27

def properties
  return {
    :description    => @r.description,
    :homepage       => @r.homepage,
    :private        => @r.private?,
    :has_issues     => @r.has_issues?,
    :has_wiki       => @r.has_wiki?,
    :has_downloads  => @r.has_downloads?,
    :default_branch => @r.default_branch
  }
end

#urlObject



23
24
25
# File 'lib/gitomator/github/model/hosted_repo.rb', line 23

def url
  @r.clone_url
end