Class: MsTeamsHermes::Actions::OpenUrl
- Defined in:
- lib/msteams_hermes/actions/open_url.rb
Overview
A class representing Microsoft’s Action.OpenUrl object adaptivecards.io/explorer/Action.OpenUrl.html
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tooltip ⇒ Object
readonly
Returns the value of attribute tooltip.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url:, title: nil, tooltip: nil) ⇒ OpenUrl
constructor
A new instance of OpenUrl.
- #to_hash ⇒ Object
Constructor Details
#initialize(url:, title: nil, tooltip: nil) ⇒ OpenUrl
Returns a new instance of OpenUrl.
14 15 16 17 18 |
# File 'lib/msteams_hermes/actions/open_url.rb', line 14 def initialize(url:, title: nil, tooltip: nil) @url = url @title = title @tooltip = tooltip end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/msteams_hermes/actions/open_url.rb', line 12 def title @title end |
#tooltip ⇒ Object (readonly)
Returns the value of attribute tooltip.
12 13 14 |
# File 'lib/msteams_hermes/actions/open_url.rb', line 12 def tooltip @tooltip end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/msteams_hermes/actions/open_url.rb', line 12 def url @url end |
Instance Method Details
#to_hash ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/msteams_hermes/actions/open_url.rb', line 20 def to_hash { type: "Action.OpenUrl", url:, title:, tooltip: } end |