class ActiveStorage::Blob

def text?

Returns true if the content_type of this blob is in the text range, like text/plain.
def text?
  content_type.start_with?("text")
end