U
U
UIRobot2014-06-19 22:04:10
Ruby on Rails
UIRobot, 2014-06-19 22:04:10

[Ruby] How to convert data received from YAML to hash?

Hello,
I'm new to RoR. The task is to get a couple of dozen settings from YAML for further transfer to different methods of a third-party gem. The parsed YAML is returned as a ruby ​​object, but I want to convert some of them to hash. Do you need to write your own method for this, or is there something like .to_hash?
Data from YAML will be used to set up xlsx export, color type, border, etc. (here are examples - https://github.com/randym/axlsx/blob/master/exampl...
Thanks)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Vsk, 2014-06-20
@UIRobot

YAML.load string
pshapoval.blogspot.com/2013/04/load-hash-from-yaml...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question