genome/dgi-db

View on GitHub
app/presenters/attribute_presenter.rb

Summary

Maintainability
A
0 mins
Test Coverage
class AttributePresenter < SimpleDelegator
  attr_accessor :attribute
  def initialize(attribute)
    @attribute = attribute
    super
  end

  def as_json
    {
      name: self.name,
      value: self.value,
      sources: self.sources.map(&:source_db_name),
    }
  end
end