Module: DrySerialization::Blueprinter

Defined in:
lib/dry_serialization/blueprinter.rb,
lib/generators/dry_serialization/blueprinter/install_generator.rb

Defined Under Namespace

Classes: InstallGenerator

Instance Method Summary collapse

Instance Method Details

#serialized_resource(resource, blueprint, options = {}) ⇒ Object



3
4
5
# File 'lib/dry_serialization/blueprinter.rb', line 3

def serialized_resource(resource, blueprint, options = {})
  JSON.parse(blueprint.render(resource, options), symbolize_names: true)
end