Sha256: 24498a7e7ad620b38aa6e111c227aedc51701eb588a594e7688927331f34dd1e
Contents?: true
Size: 585 Bytes
Versions: 1
Compression:
Stored size: 585 Bytes
Contents
module Lsgh class User attr_reader :name def initialize(name) @name = name @public = [] @private = [] end def add(repo) case repo.type when :public @public << repo when :private @private << repo end end def to_paths [ ['public', @public], ['private', @private] ].map do |type, value| value.map do |repo| repo.to_paths.map do |path| "#{@name}/#{type}/#{path}" end end.inject(:+).to_a end.inject(:+) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lsgh-0.1.0 | lib/lsgh/user.rb |