fetch

fetch( header )
fetch( header ) { |row| ... }
fetch( header, default )
Instance Public methods

This method will fetch the field value by header. It has the same behavior as Hash#fetch: if there is a field with the given header, its value is returned. Otherwise, if a block is given, it is yielded the header and its result is returned; if a default is given as the second argument, it is returned; otherwise a KeyError is raised.

doc_ruby_on_rails
2015-04-01 18:34:39
Comments
Leave a Comment

Please login to continue.