instance method Element.Layout#toHash

View source on GitHub →

Element.Layout#toHash([keys...]) → Hash
  • keys (String) – A space-separated list of keys to include.

Converts the layout hash to an ordinary hash of key/value pairs, optionally including only the given keys.

Keys can be passed into this method as individual arguments or separated by spaces within a string.

// Equivalent statements:
someLayout.toHash('top', 'bottom', 'left', 'right');
someLayout.toHash('top bottom left right');