Class: OpenStruct

Inherits:
Object show all
Defined in:
lib/extra/openstruct.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject

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