Class: EhbrsRubyUtils::Mudslide::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/mudslide/message.rb

Instance Method Summary collapse

Instance Method Details

#deliverObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ehbrs_ruby_utils/mudslide/message.rb', line 12

def deliver
  raise 'No recipient set' if recipient.blank?

  if image_path.present?
    deliver_image
  elsif text.present?
    deliver_text
  else
    deliver
  end
end