lib/warbler/jar.rb
# Add init.rb file to the war file.
Add init.rb file to the war file.
Add init . rb file to the war file .
def add_init_file(config)
      if config.init_contents
        contents = ''
        config.init_contents.each do |file|
          if file.respond_to?(:read)
            contents << file.read
          elsif File.extname(file) == '.erb'
            contents << expand_erb(file, config).read
          else
            contents << File.read(file)
          end
        end
        @files[config.init_filename] = StringIO.new(contents)
      end
    end
def add_init_file ( config ) if config . init_contents contents = '' config . init_contents . each do | file | if file . respond_to? ( :read ) contents << file . read elsif File . extname ( file ) == '.erb' contents << expand_erb ( file , config ) . read else contents << File . read ( file ) end end @files [ config . init_filename ] = StringIO . new ( contents ) end end
Add init.rb file to the war file.
Add init . rb file to the war file .
config