Module: Gitlab::Email::Message::InProductMarketing

Defined in:
lib/gitlab/email/message/in_product_marketing.rb,
lib/gitlab/email/message/in_product_marketing/base.rb,
lib/gitlab/email/message/in_product_marketing/team.rb,
lib/gitlab/email/message/in_product_marketing/trial.rb,
lib/gitlab/email/message/in_product_marketing/create.rb,
lib/gitlab/email/message/in_product_marketing/helper.rb,
lib/gitlab/email/message/in_product_marketing/verify.rb,
lib/gitlab/email/message/in_product_marketing/experience.rb,
lib/gitlab/email/message/in_product_marketing/team_short.rb,
lib/gitlab/email/message/in_product_marketing/trial_short.rb,
lib/gitlab/email/message/in_product_marketing/admin_verify.rb

Defined Under Namespace

Modules: Helper Classes: AdminVerify, Base, Create, Experience, Team, TeamShort, Trial, TrialShort, Verify

Constant Summary collapse

UnknownTrackError =
Class.new(StandardError)

Class Method Summary collapse

Class Method Details

.for(track) ⇒ Object

Raises:


9
10
11
12
13
14
# File 'lib/gitlab/email/message/in_product_marketing.rb', line 9

def self.for(track)
  valid_tracks = Namespaces::InProductMarketingEmailsService::TRACKS.keys
  raise UnknownTrackError unless valid_tracks.include?(track)

  "Gitlab::Email::Message::InProductMarketing::#{track.to_s.classify}".constantize
end