Class: Ravelin::Label

Inherits:
RavelinObject show all
Defined in:
lib/ravelin/label.rb

Constant Summary collapse

LABEL_VALUES =
%w(UNREVIEWED GENUINE FRAUDSTER)

Instance Attribute Summary collapse

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

#commentObject

Returns the value of attribute comment.



3
4
5
# File 'lib/ravelin/label.rb', line 3

def comment
  @comment
end

#customer_idObject

Returns the value of attribute customer_id.



3
4
5
# File 'lib/ravelin/label.rb', line 3

def customer_id
  @customer_id
end

#labelObject

Returns the value of attribute label.



3
4
5
# File 'lib/ravelin/label.rb', line 3

def label
  @label
end

#reviewerObject

Returns the value of attribute reviewer.



3
4
5
# File 'lib/ravelin/label.rb', line 3

def reviewer
  @reviewer
end

Instance Method Details

#validateObject



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