Class: BubbleWrap::Mail::Result
- Inherits:
-
Object
- Object
- BubbleWrap::Mail::Result
- Defined in:
- motion/mail/result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
- #canceled? ⇒ Boolean
- #failed? ⇒ Boolean
-
#initialize(result, error) ⇒ Result
constructor
A new instance of Result.
- #saved? ⇒ Boolean
- #sent? ⇒ Boolean
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
#error ⇒ Object
Returns the value of attribute error.
4 5 6 |
# File 'motion/mail/result.rb', line 4 def error @error end |
#result ⇒ Object
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
15 16 17 |
# File 'motion/mail/result.rb', line 15 def canceled? self.result == MFMailComposeResultCancelled end |
#failed? ⇒ Boolean
23 24 25 |
# File 'motion/mail/result.rb', line 23 def failed? self.result == MFMailComposeResultFailed || self.error end |
#saved? ⇒ Boolean
19 20 21 |
# File 'motion/mail/result.rb', line 19 def saved? self.result == MFMailComposeResultSaved end |
#sent? ⇒ Boolean
11 12 13 |
# File 'motion/mail/result.rb', line 11 def sent? self.result == MFMailComposeResultSent end |