class LUSI::API::Person::LeaveDetails
Attributes
last_attend_date[RW]
@!attribute [rw] last_attend_date
@return [DateTime, nil] the date of last attendance
leave_date[RW]
@!attribute [rw] leave_date
@return [DateTime, nil] the date of leaving
leave_reason[RW]
@!attribute [rw] leave_reason
@return [LUSI::API::Core::Code, nil] the reason for leaving
Public Class Methods
new(xml = nil, lookup = nil, last_attend_date: nil, leave_date: nil, leave_reason: nil)
click to toggle source
Initialises a new LeaveDetails
instance @param xml [Nokogiri::XML::Document, Nokogiri::XML::Node] the parsed XML root of the leave details @param lookup [LUSI::API::Core::Lookup::LookupService, nil] the lookup service for object resolution @param last_attend_date
[DateTime, nil] the default date of last attendance @param leave_date
[DateTime, nil] the default leave date @param leave_reason
[LUSI::API::Core::Code, nil] the reason for leaving @return [void]
# File lib/lusi_api/person/student.rb, line 37 def initialize(xml = nil, lookup = nil, last_attend_date: nil, leave_date: nil, leave_reason: nil) @leave_reason = LUSI::API::Core::Code.new(LUSI::API::Core::XML.xml_at(xml, 'xmlns:LeaveReason'), lookup) @leave_date = LUSI::API::Core::XML.xml_datetime_at(xml, 'xmlns:LeaveDate') @last_attend_date = LUSI::API::Core::XML.xml_datetime_at(xml, 'xmlns:LastAttendDate') end
Public Instance Methods
to_s()
click to toggle source
Returns a string representation of the LeaveDetails
instance @return [String] the string representation of the LeaveDetails
instance
# File lib/lusi_api/person/student.rb, line 45 def to_s @leave_reason.to_s end