Skip to content

Instantly share code, notes, and snippets.

@huned
Created November 1, 2010 20:04
Show Gist options
  • Save huned/658765 to your computer and use it in GitHub Desktop.
Save huned/658765 to your computer and use it in GitHub Desktop.
a survey DSL as valid ruby syntax
include Survey::DSL
survey 'Finances Questionnaire' do
q "Do you have a Durable Power of Attorney for Finances?" do
yes do
a "Who is the designated agent for handling your finances?" do
field 'Full Name'
phone 'Phone Number'
email 'Email'
field 'Address'
field 'Relationship'
end
a "Where are the Power of Attorney documents stored?" do
field 'Originals'
field 'Copies'
end
end
no
dont_know
end
q "Do you have a Will?" do
yes do
a "Who is the executor of your Will?" do
field 'Full Name'
phone 'Phone Number'
email 'Email'
field 'Address'
field 'Relationship'
end
a "Where are the Will documents stored?" do
field 'Originals'
field 'Copies'
end
end
no
dont_know
end
q "Do you have a Living Trust?" do
yes do
a "Who is the successor trustee of your Living Trust?" do
field 'Full Name'
phone 'Phone Number'
email 'Email'
field 'Address'
field 'Relationship'
end
a "Where are the Living Trust documents stored?" do
field 'Originals'
field 'Copies'
end
end
no
dont_know
end
q "Do you have a bank account?" do
yes do
a "List the details for each bank account", :many => true do
field "Name of Bank"
phone "Phone Number"
email "Email"
field "Address"
field "Type of Account"
secret "Account Number"
field "Other Authorized Signers on This Account"
field "Location where bank statements are stored"
q "Is this Account Payable on Death?" do
yes; no; dont_know
end
end
end
no
end
q "Do you have a Brokerage Account?" do
yes do
a "List the details for each brokerage account", :many => true do
field "Name of Brokerage Firm"
field "Name of Your Broker"
phone "Phone Number"
email "Email"
field "Address"
field "Type of Account"
secret "Account Number"
field "Other Authorized Signers on This Account"
field "Location where brokerage statements are stored"
end
end
no
end
q "Do you have a safe deposit box?" do
yes do
a "List the details for each safe deposit box", :many => true do
field "Name of Bank"
phone "Phone Number"
email "Email"
field "Address"
secret "Safe Deposit Box Number"
field "Who else is authorized to access this safe deposit box?"
secret "Where are the keys to your safe deposit box?"
end
end
no
end
q "Do you have a life insurance policy?" do
yes do
a "List details for each life insurance policy", :many => true do
field "Name of Insurance Company"
field "Name of Insurance Agent"
phone "Phone Number"
email "Email"
field "Address"
field "Policy Number"
field "Owner of the Policy"
field "Type of Policy"
text "Coverage Details"
field 'Location where ORIGINAL life insurance documents are stored'
field 'Location where COPIES of life insurance documents are stored'
end
end
no do
a "Would you like to have a life insurance policy?" do
radio 'Yes', 'No'
end
end
end
q "Do you own or lease motor vehicles?" do
yes 'Yes, I own' do
a "List the details for each motor vehicle that you own", :many => true do
field 'Make of Vehicle'
field 'Model'
year 'Year'
field 'Vehicle Identification Number'
field 'Location of the Title'
field 'Do you have a Transfer of Death Paper?'
end
end
yes 'Yes, I lease' do
a "List the details for each motor vehicle that you lease", :many => true do
field 'Make of Vehicle'
field 'Model'
number 'Year'
field 'Vehicle Identification Number'
field 'Location of Lease Documents'
end
end
no
end
q "Do you have a financial interest in a business?" do
yes do
a "List the details for each business", :many => true do
field 'Name of the Business'
field 'Business Structure'
field 'State'
number 'Percentage of Ownership or Number of Shares'
currency 'Approximate Value of the Business'
end
end
no
end
q "Do you have a non-financial assets of value (e.g., art)?" do
yes do
a "List the details for each asset", :many => true do
field 'Description'
field 'Location'
field 'Who you would like to receive it'
currency 'Approximate Value'
end
end
no
end
q "Do you have any mortgages?" do
yes do
a "List the details for each mortgage", :many => true do
field "Mortgage Holder"
currency "Balance Due"
currency "Payment Amount"
field "Payment Schedule"
date "Date Mortgage Balance is Due"
end
end
no
end
q "Do you have any loans?" do
yes do
a "List the details for each loan", :many => true do
field "Loan Holder"
currency "Balance Due"
currency "Payment Amount"
field "Payment Schedule"
date "Date Loan Balance is Due"
end
end
no
end
q "Do you have any credit card debt?" do
yes do
a "List the details for each credit card", :many => true do
field "Credit Card Issuer"
#field "Credit Card Number"
currency "Balance Due"
currency "Monthly Payment Amount"
date "Date Balance is Due"
end
end
no
end
q "Do you have any other liabilities?" do
yes do
a "List the details for each liability", :many => true do
field "Description of the Liability"
currency "Amount Due"
currency "Payment Amount"
field "Payment Schedule"
date "Date Balance is Due"
end
end
no
end
q "Do you provide financial support for children?" do
yes do
a "List the details for each child", :many => true do
field "Full Name of the Child"
phone "Phone Number"
email "Email"
field "Address"
currency "Amount of Financial Support (Monthly or Yearly)"
end
end
no
end
q "Do you provide financial support for parents?" do
yes do
a "List the details for each parent", :many => true do
field "Full Name of the Parent"
phone "Phone Number"
email "Email"
field "Address"
currency "Amount of Financial Support (Monthly or Yearly)"
end
end
no
end
q "Do you provide financial support for others?" do
yes do
a "List the details for each person", :many => true do
field "Full Name of the Person"
phone "Phone Number"
email "Email"
field "Address"
currency "Amount of Financial Support (Monthly or Yearly)"
end
end
no
end
q "Do you have personal belongings you wish to give to others?" do
yes do
a "List the details for each belonging", :many => true do
field "Description"
field "Location"
field "Who you would like to give it to"
field "Why you want them to have it"
end
end
no
end
q "Do you have income from your employer?" do
yes do
a "List the details for each employer", :many => true do
field "Name of Company"
field "Contact Person"
phone "Phone Number"
email "Email"
field "Address"
end
end
no
end
q "Do you have income from retirement funds?" do
yes do
a "List the details for each source of retirement income", :many => true do
field "Account Name"
field "Location of Account"
field "Contact Person"
phone "Phone Number"
email "Email"
field "Address"
currency "Payment Amount"
end
end
no
end
q "Do you have income from Social Security?" do
yes do
a "List the details for your Social Security income" do
currency "Payment Amount"
end
end
no
end
q "Do you have income from other sources?" do
yes do
a "List the details for each source of other income", :many => true do
field "Description"
field "Contact Person"
phone "Phone Number"
email "Email"
field "Address"
currency "Payment Amount"
end
end
no
end
q "Do you provide care for pets?" do
yes do
a 'Who would you like to take care of each pet?', :many => true do
field 'Pet Name'
field 'Full Name of Caretaker'
phone 'Phone Number'
email "Email"
field "Address"
text "Instructions for Care"
end
end
no
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment