class User
Attributes
date_of_birth[RW]
email[RW]
first_name[RW]
image_url[RW]
last_name[RW]
password[RW]
Public Class Methods
get_payload(userWithClientInfo)
click to toggle source
# File lib/domain/user.rb, line 40 def self.get_payload(userWithClientInfo) return userWithClientInfo.to_json end
json_create(o)
click to toggle source
# File lib/domain/user.rb, line 29 def self.json_create(o) b_from_json = new b_from_json.first_name = o['first_name'] b_from_json.last_name = o['last_name'] b_from_json.password = o['password'] b_from_json.date_of_birth = o['date_of_birth'] b_from_json.email = o['email'] b_from_json.image_url = o['image_url'] b_from_json end
new(first_name: nil, last_name: nil, password: nil, date_of_birth:nil, email: nil, image_url: nil)
click to toggle source
# File lib/domain/user.rb, line 11 def initialize first_name: nil, last_name: nil, password: nil, date_of_birth:nil, email: nil, image_url: nil self.first_name, self.last_name, self.password, self.date_of_birth, self.email, self.image_url = first_name, last_name, password,date_of_birth, email, image_url end
Public Instance Methods
to_json(*a)
click to toggle source
# File lib/domain/user.rb, line 18 def to_json(*a) { first_name: @first_name, last_name: @last_name, password: @password, date_of_birth: @date_of_birth, email: @email, image_url: @image_url }.to_json(*a) end