Class: Sharemotion::SHMEmail

Inherits:
Sharer
  • Object
show all
Defined in:
lib/sharemotion/sharers/email/shmemail.rb

Instance Attribute Summary

Attributes inherited from Sharer

#sharer_title

Instance Method Summary collapse

Instance Method Details

#initWithItem(item, &block) ⇒ Object



5
6
7
8
# File 'lib/sharemotion/sharers/email/shmemail.rb', line 5

def initWithItem(item, &block)
  self.sharer_title = self.to_s
  super(item, &block)
end

#share(controller) ⇒ Object



14
15
16
17
18
19
# File 'lib/sharemotion/sharers/email/shmemail.rb', line 14

def share(controller)
  if MFMailComposeViewController.canSendMail
    email_composer_view = SHMEmailComposerView.alloc.initWithItem(@item, controller:controller)
    email_composer_view.display
  end
end

#to_sObject



10
11
12
# File 'lib/sharemotion/sharers/email/shmemail.rb', line 10

def to_s
  "Email"
end