1
0

domain_block_serializer.rb 318 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. class REST::DomainBlockSerializer < ActiveModel::Serializer
  3. attributes :domain, :digest, :severity, :comment
  4. def domain
  5. object.public_domain
  6. end
  7. def digest
  8. object.domain_digest
  9. end
  10. def comment
  11. object.public_comment if instance_options[:with_comment]
  12. end
  13. end