Class: Message::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/teams/message/types.rb

Overview

Message builder class

Class Method Summary collapse

Class Method Details

.of_type(type, placeholder_list, theme_color, facts) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/capistrano/teams/message/types.rb', line 10

def self.of_type(type, placeholder_list, theme_color, facts)
  case type
  when Message::TYPE_BASIC
    Basic.new(placeholder_list, theme_color, facts)
  when Message::TYPE_CARD
    MessageCard.new(placeholder_list, theme_color, facts)
  else
    raise 'Capistrano Teams: Unknown message type'
  end
end