def when_ready(simple_check = false, &_block)
      already_marked_ready = ready

      unless simple_check
        no_ready_check_possible unless block_given?
      end

      self.ready = ready?

      not_ready_validation(ready_error || 'NO REASON PROVIDED') unless ready
      yield self if block_given?
    ensure
      self.ready = already_marked_ready
    end
def when_ready(simple_check = false, &_block)
      already_marked_ready = ready

      unless simple_check
        no_ready_check_possible unless block_given?
      end

      self.ready = ready?

      not_ready_validation(ready_error || 'NO REASON PROVIDED') unless ready
      yield self if block_given?
    ensure
      self.ready = already_marked_ready
    end
The `when_ready` method is called on an instance of an interface. This
 executes the provided validation block after the page has been loaded.
 The Ready object instance is yielded into the block.

 Calls to the `ready?` method use a poor-man's cache approach. The idea
 here being that when a page has confirmed that it is ready, meaning that
 no ready validations have failed, that information is stored so that any
 subsequent calls to `ready?` do not query the ready validations again.