Sha256: cd260bdf21169c64a1d731140155405d244999bbca08a2da42b7b70dde9c8c6f
Contents?: true
Size: 1015 Bytes
Versions: 5
Compression:
Stored size: 1015 Bytes
Contents
module Mettlr class Candidate attr_accessor :email_address, :first_name, :last_name, :date_of_birth, :contact_no, :gender, :country def initialize(options = {}) @email_address = options[:email_address] @first_name= options[:first_name] @last_name = options[:last_name] @date_of_birth = options[:date_of_birth] @contact_no = options[:contact_no] @gender = options[:gender] @country = options[:country] end def to_hash {email_address: @email_address, first_name: @first_name, last_name: @last_name, date_of_birth: @date_of_birth, contact_no: @contact_no, gender: @gender, country: @country } end def to_params {"Email Address" => @email_address, "First Name" => @first_name, "Last Name" => @last_name, "Date of birth" => @date_of_birth, "Contact no" => @contact_no, "Gender" => @gender, "Country" => @country }.reject {|k,v| v.nil?} end end end
Version data entries
5 entries across 5 versions & 1 rubygems