Class: Snapcat::Snap::Status
- Inherits:
-
Object
- Object
- Snapcat::Snap::Status
- Defined in:
- lib/snapcat/snap.rb
Constant Summary collapse
- NONE =
-1
- SENT =
0
- DELIVERED =
1
- OPENED =
2
- SCREENSHOT =
3
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #delivered? ⇒ Boolean
-
#initialize(code) ⇒ Status
constructor
A new instance of Status.
- #none? ⇒ Boolean
- #opened? ⇒ Boolean
- #screenshot? ⇒ Boolean
- #sent? ⇒ Boolean
Constructor Details
#initialize(code) ⇒ Status
Returns a new instance of Status.
55 56 57 |
# File 'lib/snapcat/snap.rb', line 55 def initialize(code) @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
53 54 55 |
# File 'lib/snapcat/snap.rb', line 53 def code @code end |
Instance Method Details
#delivered? ⇒ Boolean
59 60 61 |
# File 'lib/snapcat/snap.rb', line 59 def delivered? @code == DELIVERED end |
#screenshot? ⇒ Boolean
71 72 73 |
# File 'lib/snapcat/snap.rb', line 71 def screenshot? @code == SCREENSHOT end |