lib/gitmine/branch.rb in gitmine-0.1.15 vs lib/gitmine/branch.rb in gitmine-0.1.16

- old
+ new

@@ -29,19 +29,19 @@ # Return an array of local branches starting with digits # Example # ['123-my-branch', '1234-your-branch'] # TODO specs def local_branches - return @@local_branches if defined?(@@local_branches) && @@local_branches branches = [] + Git.local_branches.each_line do |line| if match = line[/\d+.*$/] branches << match end end - @@local_branches = branches + branches end # Return an array of remote branches # TODO specs def remote_branches @@ -78,11 +78,11 @@ end end class LocalBranch < Branch def name - @name ||= Branch.find_local(issue_id) + Branch.find_local(issue_id) end def merge_to_master Git.checkout("master") Git.pull @@ -91,10 +91,10 @@ end end class RemoteBranch < Branch def name - @name ||= Branch.find_remote(issue_id) + Branch.find_remote(issue_id) end def delete Git.delete_remote_branch(self.name) end