Class: Snapcat::Friend::Type
- Inherits:
-
Object
- Object
- Snapcat::Friend::Type
- Defined in:
- lib/snapcat/friend.rb
Constant Summary collapse
- CONFIRMED =
0
- UNCONFIRMED =
1
- BLOCKED =
2
- DELETED =
3
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #blocked? ⇒ Boolean
- #confirmed? ⇒ Boolean
- #deleted? ⇒ Boolean
-
#initialize(code) ⇒ Type
constructor
A new instance of Type.
- #unconfirmed? ⇒ Boolean
Constructor Details
#initialize(code) ⇒ Type
Returns a new instance of Type.
36 37 38 |
# File 'lib/snapcat/friend.rb', line 36 def initialize(code) @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
34 35 36 |
# File 'lib/snapcat/friend.rb', line 34 def code @code end |
Instance Method Details
#blocked? ⇒ Boolean
40 41 42 |
# File 'lib/snapcat/friend.rb', line 40 def blocked? @code == BLOCKED end |
#confirmed? ⇒ Boolean
44 45 46 |
# File 'lib/snapcat/friend.rb', line 44 def confirmed? @code == CONFIRMED end |
#deleted? ⇒ Boolean
48 49 50 |
# File 'lib/snapcat/friend.rb', line 48 def deleted? @code == DELETED end |
#unconfirmed? ⇒ Boolean
52 53 54 |
# File 'lib/snapcat/friend.rb', line 52 def unconfirmed? @code == UNCONFIRMED end |