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



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

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