Class: Elos::Result
Direct Known Subclasses
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(result) ⇒ Result
constructor
A new instance of Result.
- #pluck(key) ⇒ Object
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
#each ⇒ Object
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 |