Class: FriendlyScore::User
- Inherits:
-
Object
- Object
- FriendlyScore::User
- Defined in:
- lib/friendly_score/user.rb
Instance Method Summary collapse
-
#address ⇒ String
Address.
-
#age ⇒ Integer
Age of the user.
- #attributes ⇒ Object
-
#city_name ⇒ String
City name.
-
#city_population_50k ⇒ String
City population.
-
#contact_bank_in_90_days ⇒ String
Contact bank in 90 days.
-
#education_average ⇒ String
Education average.
-
#education_best_find ⇒ String
Education best find.
-
#educations ⇒ String
Educations.
-
#email ⇒ String
Email.
-
#facebook_id ⇒ String
Facebook id.
-
#family ⇒ String
Family.
-
#family_members_in_home ⇒ Integer
Number of family members at home.
-
#friendlyscore ⇒ Integer
Friendly score.
-
#gender ⇒ Symbol
Gender of the user.
-
#has_kids ⇒ Integer
Number of kids.
-
#id ⇒ Integer
Id.
-
#in_relationship? ⇒ Boolean
Relationship.
-
#initialize(attributes) ⇒ User
constructor
A new instance of User.
-
#lead? ⇒ Boolean
Is lead.
-
#loan_amount ⇒ Integer
Loan amount.
-
#loan_currency ⇒ String
Loan currency.
-
#loan_description ⇒ String
Loan description.
-
#loan_duration_in_days ⇒ Integer
Loan duration.
-
#mobile ⇒ String
Mobile.
-
#name ⇒ String
Name.
-
#positive? ⇒ Boolean
Is user set as positive.
-
#scoreyourself_mobile ⇒ String
ScoreyourselfMobile.
-
#skills ⇒ String
Skills.
-
#status ⇒ Integer
Status of the user.
-
#status_description ⇒ String
Status description.
-
#working? ⇒ Boolean
Is working.
Constructor Details
#initialize(attributes) ⇒ User
Returns a new instance of User.
3 4 5 |
# File 'lib/friendly_score/user.rb', line 3 def initialize attributes @attributes = attributes end |
Instance Method Details
#address ⇒ String
Address
28 29 30 |
# File 'lib/friendly_score/user.rb', line 28 def address @attributes["address"] end |
#age ⇒ Integer
Age of the user
35 36 37 |
# File 'lib/friendly_score/user.rb', line 35 def age @attributes["age"].to_i end |
#attributes ⇒ Object
7 8 9 |
# File 'lib/friendly_score/user.rb', line 7 def attributes @attributes end |
#city_name ⇒ String
City name
42 43 44 |
# File 'lib/friendly_score/user.rb', line 42 def city_name @attributes["city_name"] end |
#city_population_50k ⇒ String
City population
49 50 51 |
# File 'lib/friendly_score/user.rb', line 49 def city_population_50k @attributes["city_population_50k"] end |
#contact_bank_in_90_days ⇒ String
Contact bank in 90 days
56 57 58 |
# File 'lib/friendly_score/user.rb', line 56 def contact_bank_in_90_days @attributes["contact_bank_in_90_days"] end |
#education_average ⇒ String
Education average
70 71 72 |
# File 'lib/friendly_score/user.rb', line 70 def education_average @attributes["education_average"] end |
#education_best_find ⇒ String
Education best find
63 64 65 |
# File 'lib/friendly_score/user.rb', line 63 def education_best_find @attributes["education_best_find"] end |
#educations ⇒ String
Educations
77 78 79 |
# File 'lib/friendly_score/user.rb', line 77 def educations @attributes["educations"] end |
#email ⇒ String
84 85 86 |
# File 'lib/friendly_score/user.rb', line 84 def email @attributes["email"] end |
#facebook_id ⇒ String
Facebook id
112 113 114 |
# File 'lib/friendly_score/user.rb', line 112 def facebook_id @attributes["facebook_id"] end |
#family ⇒ String
Family
91 92 93 |
# File 'lib/friendly_score/user.rb', line 91 def family @attributes["family"] end |
#family_members_in_home ⇒ Integer
Number of family members at home
98 99 100 |
# File 'lib/friendly_score/user.rb', line 98 def family_members_in_home @attributes["family_members_in_home"].to_i end |
#friendlyscore ⇒ Integer
Friendly score
105 106 107 |
# File 'lib/friendly_score/user.rb', line 105 def friendlyscore @attributes["friendlyscore"] end |
#gender ⇒ Symbol
Gender of the user
119 120 121 |
# File 'lib/friendly_score/user.rb', line 119 def gender @attributes["gender"] == "male" ? :male : :female end |
#has_kids ⇒ Integer
Number of kids
126 127 128 |
# File 'lib/friendly_score/user.rb', line 126 def has_kids @attributes["kids"].to_i end |
#id ⇒ Integer
Id
14 15 16 |
# File 'lib/friendly_score/user.rb', line 14 def id @attributes["id"] end |
#in_relationship? ⇒ Boolean
Relationship
133 134 135 |
# File 'lib/friendly_score/user.rb', line 133 def in_relationship? @attributes["in_relationship"] == "In a relationship" end |
#lead? ⇒ Boolean
Is lead
140 141 142 143 |
# File 'lib/friendly_score/user.rb', line 140 def lead? return nil unless @attributes["is_lead"] @attributes["is_lead"].to_i == 1 end |
#loan_amount ⇒ Integer
Loan amount
164 165 166 |
# File 'lib/friendly_score/user.rb', line 164 def loan_amount @attributes["loan_amount"] end |
#loan_currency ⇒ String
Loan currency
171 172 173 |
# File 'lib/friendly_score/user.rb', line 171 def loan_currency @attributes["loan_currency"] end |
#loan_description ⇒ String
Loan description
178 179 180 |
# File 'lib/friendly_score/user.rb', line 178 def loan_description @attributes["loan_description"] end |
#loan_duration_in_days ⇒ Integer
Loan duration
185 186 187 |
# File 'lib/friendly_score/user.rb', line 185 def loan_duration_in_days @attributes["loan_duration_in_days"] end |
#mobile ⇒ String
Mobile
192 193 194 |
# File 'lib/friendly_score/user.rb', line 192 def mobile @attributes["mobile"] end |
#name ⇒ String
Name
21 22 23 |
# File 'lib/friendly_score/user.rb', line 21 def name @attributes["name"] end |
#positive? ⇒ Boolean
Is user set as positive
148 149 150 151 |
# File 'lib/friendly_score/user.rb', line 148 def positive? return nil unless @attributes["is_positive"] @attributes["is_positive"].to_i == 1 end |
#scoreyourself_mobile ⇒ String
ScoreyourselfMobile
199 200 201 |
# File 'lib/friendly_score/user.rb', line 199 def scoreyourself_mobile @attributes["scoreyourself_mobile"] end |
#skills ⇒ String
Skills
206 207 208 |
# File 'lib/friendly_score/user.rb', line 206 def skills @attributes["skills"] end |
#status ⇒ Integer
Status of the user
213 214 215 |
# File 'lib/friendly_score/user.rb', line 213 def status @attributes["status"].to_i end |
#status_description ⇒ String
Status description
220 221 222 |
# File 'lib/friendly_score/user.rb', line 220 def status_description @attributes["status_description"] end |
#working? ⇒ Boolean
Is working
156 157 158 159 |
# File 'lib/friendly_score/user.rb', line 156 def working? return nil unless @attributes["is_working"] @attributes["is_working"].to_i == 1 end |