Class: Ravelin::Label
- Inherits:
-
RavelinObject
- Object
- RavelinObject
- Ravelin::Label
- Defined in:
- lib/ravelin/label.rb
Constant Summary collapse
- LABEL_VALUES =
%w(UNREVIEWED GENUINE FRAUDSTER)
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#reviewer ⇒ Object
Returns the value of attribute reviewer.
Instance Method Summary collapse
Methods inherited from RavelinObject
attr_accessor, attr_required, #initialize, required_attributes, #serializable_hash
Constructor Details
This class inherits a constructor from Ravelin::RavelinObject
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
3 4 5 |
# File 'lib/ravelin/label.rb', line 3 def comment @comment end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
3 4 5 |
# File 'lib/ravelin/label.rb', line 3 def customer_id @customer_id end |
#label ⇒ Object
Returns the value of attribute label.
3 4 5 |
# File 'lib/ravelin/label.rb', line 3 def label @label end |
#reviewer ⇒ Object
Returns the value of attribute reviewer.
3 4 5 |
# File 'lib/ravelin/label.rb', line 3 def reviewer @reviewer end |
Instance Method Details
#validate ⇒ Object
14 15 16 17 18 |
# File 'lib/ravelin/label.rb', line 14 def validate super raise InvalidLabelValueError.new("Label value be one of #{LABEL_VALUES.join(', ')}") unless LABEL_VALUES.include?(label) end |