Class: Cpro::Entities::MotifRejet

Inherits:
Base
  • Object
show all
Defined in:
lib/cpro/entities/motif_rejet.rb

Instance Attribute Summary

Attributes inherited from Base

#payload

Instance Method Summary collapse

Methods inherited from Base

#==, #hash, #initialize, #to_h

Constructor Details

This class inherits a constructor from Cpro::Entities::Base

Instance Method Details

#codeObject

Code du motif de rejet du CDV, selon la norme AFNOR.



7
8
9
# File 'lib/cpro/entities/motif_rejet.rb', line 7

def code
  payload["codeMotifRejet"]
end

#libelleObject



11
12
13
# File 'lib/cpro/entities/motif_rejet.rb', line 11

def libelle
  payload["libelleMotifRejet"]
end

#notesObject



15
16
17
# File 'lib/cpro/entities/motif_rejet.rb', line 15

def notes
  @notes ||= Array(payload["noteStatut"]).map { |note| NoteStatut.new(note) }
end

#to_sObject



19
20
21
# File 'lib/cpro/entities/motif_rejet.rb', line 19

def to_s
  [code, libelle].compact.join("")
end