'Returns an array of :class:`Arrow <arrow.arrow.Arrow>` objects, representing
an iteration of time between two inputs.
:param frame: the timeframe.  Can be any ``datetime`` property (day, hour, minute...).
:param start: A datetime expression, the start of the range.
:param end: (optional) A datetime expression, the end of the range.
:param tz: (optional) A timezone expression.  Defaults to UTC.
:param limit: (optional) A maximum number of tuples to return.
**NOTE**: the **end** or **limit** must be provided.  Call with **end** alone to
return the entire range, with **limit** alone to return a maximum # of results from the
start, and with both to cap a range at a maximum # of results.
Supported frame values: year, quarter, month, week, day, hour, minute, second
Recognized datetime expressions:
- An :class:`Arrow <arrow.arrow.Arrow>` object.
- A ``datetime`` object.
Recognized timezone expressions:
- A ``tzinfo`` object.
- A ``str`` describing a timezone, similar to \'US/Pacific\', or \'Europe/Berlin\'.
- A ``str`` in ISO-8601 style, as in \'+07:00\'.
- A ``str``, one of the following:  \'local\', \'utc\', \'UTC\'.
Usage:
>>> start = datetime(2013, 5, 5, 12, 30)
>>> end = datetime(2013, 5, 5, 17, 15)
>>> for r in arrow.Arrow.range(\'hour\', start, end):
...     print repr(r)
<Arrow [2013-05-05T12:30:00+00:00]>
<Arrow [2013-05-05T13:30:00+00:00]>
<Arrow [2013-05-05T14:30:00+00:00]>
<Arrow [2013-05-05T15:30:00+00:00]>
<Arrow [2013-05-05T16:30:00+00:00]>'

@classmethod
def range(cls, frame, start, end=None, tz=None, limit=None):

    (_, frame_relative, relative_steps) = cls._get_frames(frame)
    tzinfo = cls._get_tzinfo((start.tzinfo if (tz is None) else tz))
    start = cls._get_datetime(start).replace(tzinfo=tzinfo)
    (end, limit) = cls._get_iteration_params(end, limit)
    end = cls._get_datetime(end).replace(tzinfo=tzinfo)
    current = cls.fromdatetime(start)
    results = []
    while ((current <= end) and (len(results) < limit)):
        results.append(current)
        values = [getattr(current, f) for f in cls._ATTRS]
        current = (cls(tzinfo=tzinfo, *values) + relativedelta(**{frame_relative: relative_steps}))
    return results
