diff options
-rw-r--r-- | lib/ostruct.rb | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -166,11 +166,21 @@ class OpenStruct # data.to_h {|name, value| [name.to_s, value.upcase] } # # => {"country" => "AUSTRALIA", "capital" => "CANBERRA" } # - def to_h(&block) - if block - @table.to_h(&block) - else - @table.dup end end |