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