Class: Elos::Result

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/elos/result.rb

Direct Known Subclasses

Criteria

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ Result

Returns a new instance of Result.



4
5
6
# File 'lib/elos/result.rb', line 4

def initialize(result)
  @result = result
end

Instance Method Details

#eachObject



8
9
10
11
12
# File 'lib/elos/result.rb', line 8

def each
  result.each do |item|
    yield item
  end
end

#pluck(key) ⇒ Object



14
15
16
# File 'lib/elos/result.rb', line 14

def pluck(key)
  map { |obj| obj.send(key) }
end