lib/codestrap.rb
def list_straps
      straps = []
      if @clients
        @clients.each do |client|
          straps ||= []
          straps += client.straplist || []
          straps.flatten!
        end
      end
      @config.local.content.each do |dir|
        next unless File.directory? dir
        if File.directory? dir
          Dir.chdir(dir) do
            straps += Dir.glob('*').select { |f| File.directory? f }
          end
        end
      end
      straps.uniq
    end
# Available projects from local and server
#
# @return [Array]
Available projects from local and server
Available projects from local and server
def list_straps
      straps = []
      if @clients
        @clients.each do |client|
          straps ||= []
          straps += client.straplist || []
          straps.flatten!
        end
      end
      @config.local.content.each do |dir|
        next unless File.directory? dir
        if File.directory? dir
          Dir.chdir(dir) do
            straps += Dir.glob('*').select { |f| File.directory? f }
          end
        end
      end
      straps.uniq
    end
def list_straps straps = [ ] if @clients @clients . each do | client | straps ||= [ ] straps += client . straplist || [ ] straps . flatten! end end @config . local . content . each do | dir | next unless File . directory? dir if File . directory? dir Dir . chdir ( dir ) do straps += Dir . glob ( '*' ) . select { | f | File . directory? f } end end end straps . uniq end
Available projects from local and server
Available projects from local and server
None
Array