lib/site_prism/page.rb
def load(expansion_or_html = {}, &block)
      self.loaded = false
      SitePrism.logger.debug("Reset loaded state on #{self.class}.")

      return_yield = if expansion_or_html.is_a?(String)
                       load_html_string(expansion_or_html, &block)
                     else
                       load_html_website(expansion_or_html, &block)
                     end

      # Ensure that we represent that the page we loaded is now indeed loaded!
      # This ensures that future calls to #loaded? do not perform the
      # instance evaluations against all load validations procs another time.
      self.loaded = true

      SitePrism.logger.info("#{self.class} loaded.")
      # Return the yield from the block if there was one, otherwise return true
      return_yield || true
    end
def load(expansion_or_html = {}, &block)
      self.loaded = false
      SitePrism.logger.debug("Reset loaded state on #{self.class}.")

      return_yield = if expansion_or_html.is_a?(String)
                       load_html_string(expansion_or_html, &block)
                     else
                       load_html_website(expansion_or_html, &block)
                     end

      # Ensure that we represent that the page we loaded is now indeed loaded!
      # This ensures that future calls to #loaded? do not perform the
      # instance evaluations against all load validations procs another time.
      self.loaded = true

      SitePrism.logger.info("#{self.class} loaded.")
      # Return the yield from the block if there was one, otherwise return true
      return_yield || true
    end
Loads the page.
 @param expansion_or_html
 @param block [&block] An optional block to run once the page is loaded.
 The page will yield the block if defined.

 Executes the block, if given.
 Runs load validations on the page, unless input is a string

 When calling #load, all the validations that are set will be ran in order