Class: Integrations::ChatMessage::DeploymentMessage
- Inherits:
-
BaseMessage
- Object
- BaseMessage
- Integrations::ChatMessage::DeploymentMessage
- Defined in:
- app/models/integrations/chat_message/deployment_message.rb
Constant Summary
Constants inherited from BaseMessage
BaseMessage::RELATIVE_LINK_REGEX
Instance Attribute Summary collapse
-
#commit_title ⇒ Object
readonly
Returns the value of attribute commit_title.
-
#commit_url ⇒ Object
readonly
Returns the value of attribute commit_url.
-
#deployable_id ⇒ Object
readonly
Returns the value of attribute deployable_id.
-
#deployable_url ⇒ Object
readonly
Returns the value of attribute deployable_url.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#short_sha ⇒ Object
readonly
Returns the value of attribute short_sha.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#user_url ⇒ Object
readonly
Returns the value of attribute user_url.
Attributes inherited from BaseMessage
#markdown, #project_name, #project_url, #user_avatar, #user_full_name, #user_name
Instance Method Summary collapse
- #activity ⇒ Object
- #attachments ⇒ Object
-
#initialize(data) ⇒ DeploymentMessage
constructor
A new instance of DeploymentMessage.
Methods inherited from BaseMessage
#fallback, #pretext, #summary, #user_combined_name
Constructor Details
#initialize(data) ⇒ DeploymentMessage
Returns a new instance of DeploymentMessage.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 15 def initialize(data) super @commit_title = data[:commit_title] @commit_url = data[:commit_url] @deployable_id = data[:deployable_id] @deployable_url = data[:deployable_url] @environment = data[:environment] @short_sha = data[:short_sha] @status = data[:status] @user_url = data[:user_url] end |
Instance Attribute Details
#commit_title ⇒ Object (readonly)
Returns the value of attribute commit_title.
6 7 8 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 6 def commit_title @commit_title end |
#commit_url ⇒ Object (readonly)
Returns the value of attribute commit_url.
7 8 9 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 7 def commit_url @commit_url end |
#deployable_id ⇒ Object (readonly)
Returns the value of attribute deployable_id.
8 9 10 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 8 def deployable_id @deployable_id end |
#deployable_url ⇒ Object (readonly)
Returns the value of attribute deployable_url.
9 10 11 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 9 def deployable_url @deployable_url end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
10 11 12 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 10 def environment @environment end |
#short_sha ⇒ Object (readonly)
Returns the value of attribute short_sha.
11 12 13 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 11 def short_sha @short_sha end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
12 13 14 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 12 def status @status end |
#user_url ⇒ Object (readonly)
Returns the value of attribute user_url.
13 14 15 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 13 def user_url @user_url end |
Instance Method Details
#activity ⇒ Object
37 38 39 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 37 def activity {} end |
#attachments ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'app/models/integrations/chat_message/deployment_message.rb', line 28 def return if markdown [{ text: format(), color: color }] end |