sanger/sequencescape

View on GitHub
app/api/io/tube/purpose.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true
require_dependency 'tube/purpose'

# Controls API V1 IO for Tube
class Io::Tube::Purpose < Core::Io::Base
  set_model_for_input(::Tube::Purpose)
  set_json_root(:tube_purpose)

  define_attribute_and_json_mapping(
    '
    name  <=> name
    parent_purposes <= parents
    child_purposes <= children
    target_type <= target_type
    type <= type
  '
  )
end