diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-04-04 12:16:24 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-04-05 15:57:12 +0300 |
commit | 05f69ef21246f1a2c0b83540d3e205c9e4d77819 (patch) | |
tree | 7d7d0d91fd2044d154d618622401e00958adefb8 /lib/microsoft_teams/activity.rb | |
parent | 9bfa0a5ffab279f25c52f2e1e9644616168bf994 (diff) |
adds microsoft team activity object and refactors code accordingly
Diffstat (limited to 'lib/microsoft_teams/activity.rb')
-rw-r--r-- | lib/microsoft_teams/activity.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/microsoft_teams/activity.rb b/lib/microsoft_teams/activity.rb new file mode 100644 index 00000000000..e25ce262cbf --- /dev/null +++ b/lib/microsoft_teams/activity.rb @@ -0,0 +1,19 @@ +module MicrosoftTeams + class Activity + def initialize(title, subtitle, text, image) + @title = title + @subtitle = subtitle + @text = text + @image = image + end + + def to_json + { + 'activityTitle' => @title, + 'activitySubtitle' => @subtitle, + 'activityText' => @text, + 'activityImage' => @image + }.to_json + end + end +end |