Class: ActivityPub::ImageSerializer
- Inherits:
-
BaseSerializer
- Object
- Granola::Serializer
- BaseSerializer
- ActivityPub::ImageSerializer
- Defined in:
- app/serializers/activitypub/image_serializer.rb
Constant Summary
Constants inherited from BaseSerializer
Instance Attribute Summary
Attributes inherited from BaseSerializer
Instance Method Summary collapse
Methods inherited from BaseSerializer
#as_json, #initialize, #to_json
Constructor Details
This class inherits a constructor from ActivityPub::BaseSerializer
Instance Method Details
#data ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/serializers/activitypub/image_serializer.rb', line 3 def data { type: 'Image', url: image_url(object[:size_400].url, host: ActionController::Base.asset_host), media_type: object[object.keys.first].mime_type } end |