each_pair()
Instance Public methods
Yields all attributes (as a symbol) along with the corresponding values or returns an enumerator if not block is given. Example:
require 'ostruct' data = OpenStruct.new("country" => "Australia", :population => 20_000_000) data.each_pair.to_a # => [[:country, "Australia"], [:population, 20000000]]
Please login to continue.