Method: Codger::Manager#match_cached_identifier
- Defined in:
- lib/codger/manager.rb
#match_cached_identifier(identifier) ⇒ Object
Find a cached repository with an identifier similar to the given one (specifically, that has the given one as a substring). Returns [identifier, clone]
112 113 114 115 116 117 |
# File 'lib/codger/manager.rb', line 112 def match_cached_identifier identifier return nil if identifier.size < 4 # crude typo protection settings[:cached].detect do |cached_id, clone| cached_id.include?(identifier) end end |