Class: Drone::Repository
- Inherits:
-
Object
- Object
- Drone::Repository
- Defined in:
- lib/drone/repository.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#clone_url ⇒ Object
readonly
Returns the value of attribute clone_url.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#git_url ⇒ Object
readonly
Returns the value of attribute git_url.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#post_commits ⇒ Object
readonly
Returns the value of attribute post_commits.
-
#private ⇒ Object
readonly
Returns the value of attribute private.
-
#privileged ⇒ Object
readonly
Returns the value of attribute privileged.
-
#pull_requests ⇒ Object
readonly
Returns the value of attribute pull_requests.
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
-
#ssh_url ⇒ Object
readonly
Returns the value of attribute ssh_url.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(remote: nil, host: nil, owner: nil, name: nil, url: nil, clone_url: nil, git_url: nil, ssh_url: nil, active: nil, private: nil, privileged: nil, post_commits: nil, pull_requests: nil, timeout: nil, created_at: nil, updated_at: nil) ⇒ Repository
constructor
A new instance of Repository.
- #path ⇒ Object
Constructor Details
#initialize(remote: nil, host: nil, owner: nil, name: nil, url: nil, clone_url: nil, git_url: nil, ssh_url: nil, active: nil, private: nil, privileged: nil, post_commits: nil, pull_requests: nil, timeout: nil, created_at: nil, updated_at: nil) ⇒ Repository
Returns a new instance of Repository.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/drone/repository.rb', line 5 def initialize( remote: nil, host: nil, owner: nil, name: nil, url: nil, clone_url: nil, git_url: nil, ssh_url: nil, active: nil, private: nil, privileged: nil, post_commits: nil, pull_requests: nil, timeout: nil, created_at: nil, updated_at: nil) @remote = remote @host = host @owner = owner @name = name @url = url @clone_url = clone_url @git_url = git_url @ssh_url = ssh_url @active = active @private = private @privileged = privileged @post_commits = post_commits @pull_requests = pull_requests @timeout = timeout @created_at = created_at @updated_at = updated_at end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def active @active end |
#clone_url ⇒ Object (readonly)
Returns the value of attribute clone_url.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def clone_url @clone_url end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def created_at @created_at end |
#git_url ⇒ Object (readonly)
Returns the value of attribute git_url.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def git_url @git_url end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def host @host end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def owner @owner end |
#post_commits ⇒ Object (readonly)
Returns the value of attribute post_commits.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def post_commits @post_commits end |
#private ⇒ Object (readonly)
Returns the value of attribute private.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def private @private end |
#privileged ⇒ Object (readonly)
Returns the value of attribute privileged.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def privileged @privileged end |
#pull_requests ⇒ Object (readonly)
Returns the value of attribute pull_requests.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def pull_requests @pull_requests end |
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def remote @remote end |
#ssh_url ⇒ Object (readonly)
Returns the value of attribute ssh_url.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def ssh_url @ssh_url end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def timeout @timeout end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/drone/repository.rb', line 3 def url @url end |
Class Method Details
.build_with_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/drone/repository.rb', line 32 def self.build_with_hash(hash) Repository.new( remote: hash["remote"], host: hash["host"], owner: hash["owner"], name: hash["name"], url: hash["url"], clone_url: hash["clone_url"], git_url: hash["git_url"], ssh_url: hash["ssh_url"], active: hash["active"], private: hash["private"], privileged: hash["privileged"], post_commits: hash["post_commits"], pull_requests: hash["pull_requests"], timeout: hash["timeout"], created_at: hash["created_at"], updated_at: hash["updated_at"] ) end |
Instance Method Details
#path ⇒ Object
28 29 30 |
# File 'lib/drone/repository.rb', line 28 def path [@host, @owner, @name].join("/") end |