Class: Sovren::Certification
- Inherits:
-
Object
- Object
- Sovren::Certification
- Defined in:
- lib/sovren/certification.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#effective_date ⇒ Object
Returns the value of attribute effective_date.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/sovren/certification.rb', line 3 def description @description end |
#effective_date ⇒ Object
Returns the value of attribute effective_date.
3 4 5 |
# File 'lib/sovren/certification.rb', line 3 def effective_date @effective_date end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/sovren/certification.rb', line 3 def name @name end |
Class Method Details
.parse(certifications) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sovren/certification.rb', line 5 def self.parse(certifications) return Array.new if certifications.nil? result = certifications.css('LicenseOrCertification').collect do |item| c = Certification.new c.name = item.css('Name').text c.description = item.css('Description').text c.effective_date = Date.parse(item.css('EffectiveDate FirstIssuedDate AnyDate').text) rescue nil c end result end |