Sha256: a6503133133971297bbd172c70bfae394c0fe2ccc316349bdda58dc032e9a6da

Contents?: true

Size: 769 Bytes

Versions: 2

Compression:

Stored size: 769 Bytes

Contents

module Redcar
  module Scm
    class ScmCommitsMirror
      class CommitsNode
        include Redcar::Tree::Mirror::NodeMirror
        
        attr_reader :repo, :branch
        
        def initialize(repo, branch=nil, text=nil)
          @repo = repo
          @branch = branch
          @text = text || branch || @repo.translations[:unpushed_commits]
        end
        
        def text
          @text
        end
        
        def icon
          File.join(Scm::ICONS_DIR, "folder--arrow.png")
        end
        
        def leaf?
          false
        end
        
        def children
          if branch
            @repo.unpushed_commits(branch)
          else
            @repo.unpushed_commits
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redcar-0.4.1 plugins/scm/lib/scm/scm_commits_mirror/commits_node.rb
redcar-0.4 plugins/scm/lib/scm/scm_commits_mirror/commits_node.rb