Class: Microclimate::Branch

Inherits:
Repository show all
Defined in:
lib/microclimate/branch.rb

Instance Attribute Summary collapse

Attributes inherited from Repository

#client, #repo_id

Instance Method Summary collapse

Methods inherited from Repository

#branch_for, #ready?, #refresh!, #status

Methods inherited from Base

#connection, #host

Constructor Details

#initialize(client, parent_repo, name) ⇒ Branch

Returns a new instance of Branch.



5
6
7
8
9
# File 'lib/microclimate/branch.rb', line 5

def initialize(client, parent_repo, name)
  @client = client
  @parent_repo = parent_repo
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/microclimate/branch.rb', line 3

def name
  @name
end

#parent_repoObject

Returns the value of attribute parent_repo.



3
4
5
# File 'lib/microclimate/branch.rb', line 3

def parent_repo
  @parent_repo
end

Instance Method Details

#www_urlObject



13
14
15
# File 'lib/microclimate/branch.rb', line 13

def www_url
  "https://codeclimate.com/repos/#{repo_id}/compare/#{name}"
end