instance method
fetch
Ruby on Rails edge
Since edgeSignature
fetch(column)
No documentation comment.
Parameters
-
columnreq
Source
# File activemodel/lib/active_model/indexed_row.rb, line 173
def fetch(column)
if index = @indexes[column]
value = @row[index]
if UNSET.equal?(value)
if block_given?
yield
else
raise KeyError, "key not found: #{column.inspect}"
end
else
value
end
elsif block_given?
yield
else
raise KeyError, "key not found: #{column.inspect}"
end
end
Defined in activemodel/lib/active_model/indexed_row.rb line 173
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::IndexedRow::Mutable