lib/gollum/file.rb
# Find a file in the given Gollum repo.
#
# name    - The full String path.
# version - The String version ID to find.
#
# Returns a Gollum::File or nil if the file could not be found.
Find a file in the given Gollum repo.
name    - The full String path.
version - The String version ID to find.

Returns a Gollum::File or nil if the file could not be found.
Find a file in the given Gollum repo . name - The full String path . version - The String version ID to find . Returns a Gollum :: File or nil if the file could not be found .
def find(name, version)
      checked = name.downcase
      map     = @wiki.tree_map_for(version)
      if entry = map.detect { |entry| entry.path.downcase == checked }
        @path    = name
        @blob    = entry.blob(@wiki.repo)
        @version = version.is_a?(Grit::Commit) ? version : @wiki.commit_for(version)
        self
      end
    end
def find ( name , version ) checked = name . downcase map = @wiki . tree_map_for ( version ) if entry = map . detect { | entry | entry . path . downcase == checked } @path = name @blob = entry . blob ( @wiki . repo ) @version = version . is_a? ( Grit :: Commit ) ? version : @wiki . commit_for ( version ) self end end
Find a file in the given Gollum repo.
Find a file in the given Gollum repo .
name
version