Sha256: 0e1a6960142d7275e9d4529885b186c1607e7071ea7964d6143cc88ea602e35a

Contents?: true

Size: 1004 Bytes

Versions: 57

Compression:

Stored size: 1004 Bytes

Contents

module Redcar
  module Scm
    class ScmChangesMirror
      class ChangesNode
        include Redcar::Tree::Mirror::NodeMirror
        
        attr_reader :change_types
        
        def initialize(repo, change_types)
          @repo = repo
          @change_types = change_types
        end
        
        def text
          case @change_types
          when :indexed
            @repo.translations[:indexed_changes]
          when :unindexed
            @repo.translations[:unindexed_changes]
          when :all
            @repo.translations[:uncommited_changes]
          end
        end
        
        def icon
          :directory
        end
        
        def leaf?
          false
        end
        
        def children
          case @change_types
          when :indexed
            @repo.indexed_changes
          when :unindexed
            @repo.unindexed_changes
          when :all
            @repo.uncommited_changes
          end
        end
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 2 rubygems

Version Path
redcar-0.13 plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.13.5dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.13.4dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.13.3dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.13.2dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.13.1dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-0.12.1 plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.13.0dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-0.12 plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.27dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.26dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.25dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.24dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.23dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.22dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.21dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.20dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.19dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.18dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb
redcar-dev-0.12.17dev plugins/scm/lib/scm/scm_changes_mirror/changes_node.rb