Method: Orchestrate::RefList::Fetcher#take
- Defined in:
- lib/orchestrate/refs.rb
#take(count) ⇒ Array<Ref>
Returns the first n items. Equivalent to Enumerable#take. Sets the limit
parameter on the query to Orchestrate, so we don't ask for more items than
desired.
150 151 152 153 154 155 |
# File 'lib/orchestrate/refs.rb', line 150 def take(count) count = 1 if count < 1 count = 100 if count > 100 @limit = count super(count) end |