# Class Tree < Object

- app/models/tree.rb

Methods

E
  - empty?
I
  - invalid?,
  - is_blob?
N
  - new

Included Modules

- Linguist::BlobHelper

Attributes

[RW] | path |
[RW] | project |
[RW] | ref |
[RW] | tree |

Class Public methods
new(raw_tree, project, ref = nil, path = nil) Link

Source: show

    # File app/models/tree.rb, line 8
    def initialize(raw_tree, project, ref = nil, path = nil)
      @project, @ref, @path = project, ref, path
      @tree = if path.present?
                raw_tree / path
              else
                raw_tree
              end
    end

Instance Public methods
empty?() Link

Source: show

    # File app/models/tree.rb, line 25
    def empty?
      data.blank?
    end

invalid?() Link

Source: show

    # File app/models/tree.rb, line 21
    def invalid?
      tree.nil?
    end

is_blob?() Link

Source: show

    # File app/models/tree.rb, line 17
    def is_blob?
      tree.is_a?(Grit::Blob)
    end