class ActiveGraph::Shared::TypeConverters::YAMLConverter

Converts hash to/from YAML

Public Class Methods

convert_type() click to toggle source
    # File lib/active_graph/shared/type_converters.rb
231 def convert_type
232   Hash
233 end
db_type() click to toggle source
    # File lib/active_graph/shared/type_converters.rb
235 def db_type
236   String
237 end
to_db(value) click to toggle source
    # File lib/active_graph/shared/type_converters.rb
239 def to_db(value)
240   Psych.dump(value)
241 end
to_ruby(value) click to toggle source
    # File lib/active_graph/shared/type_converters.rb
243 def to_ruby(value)
244   value.is_a?(Hash) ? value : Psych.load(value)
245 end