def resolve(name, context, start_at = nil, end_at = nil)
      stat = @stats.detect { |s| s[:name] == name }
      return stat[:block].call(context, start_at, end_at) if stat.present?
      raise StandardError, "Stats '#{name}' is not registered."
    end
def resolve(name, context, start_at = nil, end_at = nil)
      stat = @stats.detect { |s| s[:name] == name }
      return stat[:block].call(context, start_at, end_at) if stat.present?
      raise StandardError, "Stats '#{name}' is not registered."
    end
Public: Returns a number returned by executing the corresponding block.

 name - The name of the stat
 context - An arbritrary context object to compute the result.
 start_at - A date to filter resources created after it
 end_at - A date to filter resources created before it.

 Returns the result of executing the stats block using the passing context or an error.