def to_hash(object = nil, settings = nil, options = nil)
@_object = object if object
@options.merge!(options) if options
@settings.merge!(settings) if settings
cache_results do
@_result = {}
compile_settings(:attributes)
merge_engines_into_result
compile_settings(:node)
replace_nil_values if Rabl.configuration.replace_nil_values_with_empty_strings
replace_empty_string_values if Rabl.configuration.replace_empty_string_values_with_nil_values
remove_nil_values if Rabl.configuration.exclude_nil_values
result = @_result
result = { @options[:root_name] => result } if @options[:root_name].present?
result
end
end