module EntitySnapshot::Postgres::Controls::Entity::Example::Transformer
Public Class Methods
instance(raw_data)
click to toggle source
# File lib/entity_snapshot/postgres/controls/entity.rb, line 28 def self.instance(raw_data) Example.build({ :some_attribute => raw_data[:some_attribute], :some_time => Clock.parse(raw_data[:some_time]) }) end
raw_data(instance)
click to toggle source
# File lib/entity_snapshot/postgres/controls/entity.rb, line 21 def self.raw_data(instance) { :some_attribute => instance.some_attribute, :some_time => Clock.iso8601(instance.some_time) } end