Class: Webhookdb::Messages::Invite

Inherits:
Webhookdb::Message::Template show all
Defined in:
lib/webhookdb/messages/invite.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Webhookdb::Message::Template

#dispatch, #dispatch_email, #extra_fields, #full_template_name, #layout, #layout_path, #liquify, #template_folder, #template_name, #template_path

Constructor Details

#initialize(membership) ⇒ Invite

Returns a new instance of Invite.



12
13
14
15
# File 'lib/webhookdb/messages/invite.rb', line 12

def initialize(membership)
  @membership = membership
  super()
end

Class Method Details

.fixtured(recipient) ⇒ Object



6
7
8
9
10
# File 'lib/webhookdb/messages/invite.rb', line 6

def self.fixtured(recipient)
  org = Webhookdb::Fixtures.organization.with_member(recipient).create
  membership = org.all_memberships[0]
  return self.new(membership)
end

Instance Method Details

#liquid_dropsObject



17
18
19
20
21
22
# File 'lib/webhookdb/messages/invite.rb', line 17

def liquid_drops
  return super.merge(
    organization_name: @membership.organization_name,
    invite_code: @membership.invitation_code,
  )
end