Guest User

Untitled

a guest
Jul 8th, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.85 KB | None | 0 0
  1. class MortgageApplication::Borrower                                            
  2.   include Virtus.model                                                          
  3.                                                                                
  4.   attribute :personal_information, PersonalInformation, default: :build_personal_info
  5.   attribute :current_address, Address, default: :build_address                  
  6.   attribute :resided_at_address_since, String, default: ""                      
  7.   attribute :owns_current_residence, String, default: ""                        
  8.   attribute :current_employer, Employer, default: :build_employer              
  9.   attribute :previous_employer, Employer, default: :build_employer              
  10.                                                                                
  11.   def build_employer                                                            
  12.     Employer.new                                                                
  13.   end                                                                          
  14.                                                                                
  15.   def build_personal_info                                                      
  16.     PersonalInformation.new                                                    
  17.   end                                                                          
  18.                                                                                
  19.   def build_address                                                            
  20.     Address.new                                                                
  21.   end                                                                          
  22.                                                                                
  23. end
Advertisement
Add Comment
Please, Sign In to add comment