support/fake_site_generator.rb
# Generates pages in the site's root URL
Generates pages in the site's root URL
Generates pages in the site ' s root URL
def generate_pages(count: , &block)
      dir = @dir.join("pages")
      FileUtils.mkdir_p dir.join("pages")
      next_page_name.take(count).map do |page_name|
        path = dir.join(page_name)
        block ? block.call(path) : File.write(path, '<h1>Some glorius content!</h1>')
        @pages.push path
      end
    end
def generate_pages ( count : , & block ) dir = @dir . join ( "pages" ) FileUtils . mkdir_p dir . join ( "pages" ) next_page_name . take ( count ) . map do | page_name | path = dir . join ( page_name ) block ? block . call ( path ) : File . write ( path , '<h1>Some glorius content!</h1>' ) @pages . push path end end
Generates pages in the site's root URL
Generates pages in the site ' s root URL
count
<not_specific>
block
<not_specific>