Sha256: 18608dd4e6e56d7ea60cad25822ad92b53641a7449b1eafa5f4b64b48294b9d2
Contents?: true
Size: 397 Bytes
Versions: 8
Compression:
Stored size: 397 Bytes
Contents
module GitCompound # Git repositories module, also repository factory # module Repository extend self def factory(source) if local?(source) RepositoryLocal.new(source) else RepositoryRemote.new(remote = source) # rubocop:disable Lint/UselessAssignment end end def local?(source) source.match(%r{(^\/|file:\/\/).*}) end end end
Version data entries
8 entries across 8 versions & 1 rubygems