Method: FrOData::EntitySet#first
- Defined in:
- lib/frodata/entity_set.rb
#first(count = 1) ⇒ FrOData::EntitySet
Return the first ‘n` Entities for the set. If count is 1 it returns the single entity, otherwise its an array of entities
47 48 49 50 |
# File 'lib/frodata/entity_set.rb', line 47 def first(count = 1) result = query.limit(count).execute count == 1 ? result.first : result.to_a end |