class GitObjectBrowser::Models::InfoRefs
Public Class Methods
new(input)
click to toggle source
# File lib/git-object-browser/models/info_refs.rb, line 7 def initialize(input) @entries = [] while (line = input.gets) do next if line =~ /\A\s*#/ next unless line =~ /([0-9a-f]{40})\s*(.*)/ entry = {} entry[:sha1] = $1 entry[:ref] = $2 @entries << entry end end
path?(relpath)
click to toggle source
# File lib/git-object-browser/models/info_refs.rb, line 25 def self.path?(relpath) return relpath == "info/refs" end
Public Instance Methods
to_hash()
click to toggle source
# File lib/git-object-browser/models/info_refs.rb, line 19 def to_hash return { :entries => @entries } end