class Fabrique::Test::Fixtures::Repository::ProductDataMapper

Public Instance Methods

from_dto(dto) click to toggle source
# File lib/fabrique/test/fixtures/repository.rb, line 127
def from_dto(dto)
  Product.new(id: dto[:id], name: dto[:name], price: dto[:price])
end
to_dto(entity) click to toggle source
# File lib/fabrique/test/fixtures/repository.rb, line 119
def to_dto(entity)
  {
    id: entity.id,
    name: entity.name,
    price: entity.price,
  }
end