Class: OpenStruct
Instance Method Summary collapse
-
#to_hash ⇒ Object
Gets the open struct hash.
-
#to_yaml(*args) ⇒ Object
Get the YAML representation of the struct.
Instance Method Details
#to_hash ⇒ Object
Gets the open struct hash.
Returns: Hash
8 9 10 |
# File 'lib/extra/openstruct.rb', line 8 def to_hash @table end |
#to_yaml(*args) ⇒ Object
Get the YAML representation of the struct.
Returns: YAML string
16 17 18 19 |
# File 'lib/extra/openstruct.rb', line 16 def to_yaml(*args) require 'yaml' to_hash.to_yaml(*args) end |