Class: BubbleWrap::Mail::Result

Inherits:
Object
  • Object
show all
Defined in:
motion/mail/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, error) ⇒ Result

Returns a new instance of Result


6
7
8
9
# File 'motion/mail/result.rb', line 6

def initialize(result, error)
  self.result = result
  self.error = error
end

Instance Attribute Details

#errorObject

Returns the value of attribute error


4
5
6
# File 'motion/mail/result.rb', line 4

def error
  @error
end

#resultObject

Returns the value of attribute result


4
5
6
# File 'motion/mail/result.rb', line 4

def result
  @result
end

Instance Method Details

#canceled?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'motion/mail/result.rb', line 15

def canceled?
  self.result == MFMailComposeResultCancelled
end

#failed?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'motion/mail/result.rb', line 23

def failed?
  self.result == MFMailComposeResultFailed || self.error
end

#saved?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'motion/mail/result.rb', line 19

def saved?
  self.result == MFMailComposeResultSaved
end

#sent?Boolean

Returns:

  • (Boolean)

11
12
13
# File 'motion/mail/result.rb', line 11

def sent?
  self.result == MFMailComposeResultSent
end