Method: Cb::Models::Company#initialize
- Defined in:
- lib/cb/models/implementations/company.rb
#initialize(args = {}) ⇒ Company
Returns a new instance of Company.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/cb/models/implementations/company.rb', line 33 def initialize(args = {}) return if args.nil? # General ################################################################ @did = args['CompanyDID'] || '' @name = args['CompanyName'] || '' @hh_name = args['HHName'] || '' @url = args['URL'] || '' @size = args['CompanySize'] || '' @type = args['CompanyType'] || '' @year_founded = args['YearFounded'] || '' @news_feed = args['NewsFeed'] || '' @overview = args['Overview'] || '' @total_jobs = args['TotalNumberJobs'] || '' @headquarters = args['Headquarter'] || '' @host_sites = args['HostSites'] || '' @s_drive = args['SDrive'] || '' @industry = args['IndustryType'] || '' # Images ################################################################ @logo = args['CompanyLogo'] || '' @header_image = args['HeaderImage'] || '' = args['FooterImage'] || '' @image_file = args['ImageFile'] || '' @photos = args['CompanyPhotos']['PhotoList'] || '' @my_photos = args['MyPhotos'] || '' # Videos ################################################################ @bright_cove_video = args['BrightcoveVideo'] || '' # Social sites ################################################################ @facebook_url = args['FBPageURL'] || args['FacebookURL'] || '' = args['FacebookWidget'] || '' @twitter_url = args['TwitterURL'] || '' = args['TwitterWidget'] || '' @linked_in_url = args['LinkedURL'] || '' = args['LinkedInWidget'] || '' # Detailed information (blobs) ################################################################ @history = args['HistoryBody'] || '' @people = args['PeopleBody'] || '' @people_label = args['PeopleLabel'] || '' @contact = args['ContactBody'] || '' @contact_label = args['ContactLabel'] || '' @benefits = args['BenefitsBody'] || '' @benefits_label = args['BenefitsLabel'] || '' @vision = args['VisionBody'] || '' @vision_label = args['VisionLabel'] || '' @products = args['ProductsBody'] || '' @products_label = args['ProductsLabel'] || '' @career_opps = args['CareerOpportunitiesBody'] || '' @career_opps_label = args['CareerOpportunitiesLabel'] || '' @culture = args['CultureBody'] || '' @culture_label = args['CultureLabel'] || '' @bulletin_board = args['CompanyBulletinBoard']['bulletinboards'] || '' @testimonials = args['Testimonials']['Testimonials'] || '' @addresses = [] if args.key?('CompanyAddress') unless args['CompanyAddress'].empty? || args['CompanyAddress']['AddressList'].nil? args['CompanyAddress']['AddressList']['Address'].each do |cur_addr| @addresses << Company::Address.new(cur_addr) end end end @college = args['CollegeBody'] || '' @college_label = args['CollegeLabel'] || '' @diversity = args['DiversityBody'] || '' @diversity_label = args['DiversityLabel'] || '' @links = args['CompanyLinksCollection']['companylinks'] || '' # tabs, colors, buttons, headers, etc ################################################################ @extra_custom_tab = args['ExtraCustomTab'] || '' @tab_header_bg_color = args['TabHeaderBGColor'] || '' @tab_header_text_color = args['TabHeaderTextColor'] || '' @tab_header_hover_color = args['TabHeaderHoverColor'] || '' = args['SidebarHeaderColor'] || '' = args['ButtonColor'] || '' = args['ButtonTextColor'] || '' @gutter_bg_color = args['GutterBGColor'] || '' @my_content_tabs = args['MyContent']['MyContentTabs'] || '' @info_tabs = args['InfoTabs']['InfoTabs'] || '' @is_enhance = args['isEnhance'] || '' @is_military = args['MilitaryIcon'] || '' @is_premium = args['PremiumProfile'] || '' end |