Method: ActiveRecord::Result::IndexedRow#fetch
- Defined in:
- activerecord/lib/active_record/result.rb
#fetch(column) ⇒ Object
70 71 72 73 74 75 76 77 78 |
# File 'activerecord/lib/active_record/result.rb', line 70 def fetch(column) if index = @column_indexes[column] @row[index] elsif block_given? yield else raise KeyError, "key not found: #{column.inspect}" end end |