Class: UffizziCore::Api::Cli::V1::Projects::Deployments::ActivityItemSerializer
- Inherits:
-
BaseSerializer
- Object
- BaseSerializer
- UffizziCore::Api::Cli::V1::Projects::Deployments::ActivityItemSerializer
- Defined in:
- app/serializers/uffizzi_core/api/cli/v1/projects/deployments/activity_item_serializer.rb
Instance Method Summary collapse
Instance Method Details
#commit ⇒ Object
17 18 19 |
# File 'app/serializers/uffizzi_core/api/cli/v1/projects/deployments/activity_item_serializer.rb', line 17 def commit object.commit.to_s.slice(0..6) end |
#state ⇒ Object
21 22 23 |
# File 'app/serializers/uffizzi_core/api/cli/v1/projects/deployments/activity_item_serializer.rb', line 21 def state object.events.order_by_id.last&.state end |
#type ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/serializers/uffizzi_core/api/cli/v1/projects/deployments/activity_item_serializer.rb', line 9 def type return :github if object.type == UffizziCore::ActivityItem::Github.name return :docker if object.type == UffizziCore::ActivityItem::Docker.name return :memory_limit if object.type == UffizziCore::ActivityItem::MemoryLimit.name nil end |