Method: Ra10ke::GitRepo#get_ref_like

Defined in:
lib/ra10ke/git_repo.rb

#get_ref_like(ref_name) ⇒ String

Returns the matching ref_name or nil.

Parameters:

Returns:

  • (String)

    the matching ref_name or nil



105
106
107
108
109
110
111
# File 'lib/ra10ke/git_repo.rb', line 105

def get_ref_like(ref_name)
  return nil unless valid_url?

  all_refs.find do |ref|
    ref[:name].include?(ref_name)
  end
end