Class: MsTeamsHermes::Actions::OpenUrl

Inherits:
Base
  • Object
show all
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

Instance Method Summary collapse

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

#titleObject (readonly)

Returns the value of attribute title.



12
13
14
# File 'lib/msteams_hermes/actions/open_url.rb', line 12

def title
  @title
end

#tooltipObject (readonly)

Returns the value of attribute tooltip.



12
13
14
# File 'lib/msteams_hermes/actions/open_url.rb', line 12

def tooltip
  @tooltip
end

#urlObject (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_hashObject



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