Puppet::Type.type(:runtime_fail).provide(
  :default,
) do

  def ready
    if resource[:fail]
      fail(resource[:message])
    end
  end

  def ready=(val)
    # do nothing
  end

end

Puppet::Type.type(:runtime_fail).provide(
  :default,
) do

  def ready
    if resource[:fail]
      fail(resource[:message])
    end
    true
  end

  def ready=(val)
    # do nothing
  end

end

Return correct value from getter from runtime_fail
Return correct value from getter from runtime_fail

This will avoid calling setter method on every run because of wrong return from
getter.
