class SoftwareDetailSerializer < Blueprinter::Base
  field(:software)           { |sw, _|    SoftwareSerializer.render_as_hash(sw) }
  field(:releases)           { |_, opts|  ReleaseSerializer.render_as_hash(opts[:releases]) }
  field(:latestRelease)      { |_, opts|  opts[:latest]      ? ReleaseSerializer.render_as_hash(opts[:latest])      : nil }
  field(:webPlayableRelease) { |_, opts|  opts[:web_playable] ? ReleaseSerializer.render_as_hash(opts[:web_playable]) : nil }
end
