class Cb::Models::Company

Attributes

addresses[RW]
benefits[RW]
benefits_label[RW]
bright_cove_video[RW]
bulletin_board[RW]
button_color[RW]
button_text_color[RW]
career_opps[RW]
career_opps_label[RW]
college[RW]
college_label[RW]
contact[RW]
contact_label[RW]
culture[RW]
culture_label[RW]
did[RW]
diversity[RW]
diversity_label[RW]
extra_custom_tab[RW]
facebook_url[RW]
facebook_widget[RW]
gutter_bg_color[RW]
header_image[RW]
headquarters[RW]
hh_name[RW]
history[RW]
host_sites[RW]
image_file[RW]
industry[RW]
info_tabs[RW]
is_enhance[RW]
is_military[RW]
is_premium[RW]
linked_in_url[RW]
linked_in_widget[RW]
my_content_tabs[RW]
my_photos[RW]
name[RW]
news_feed[RW]
overview[RW]
people[RW]
people_label[RW]
photos[RW]
products[RW]
products_label[RW]
s_drive[RW]
side_bar_header_color[RW]
size[RW]
tab_header_bg_color[RW]
tab_header_hover_color[RW]
tab_header_text_color[RW]
testimonials[RW]
total_jobs[RW]
twitter_url[RW]
twitter_widget[RW]
type[RW]
url[RW]
vision[RW]
vision_label[RW]
year_founded[RW]

Public Class Methods

new(args = {}) click to toggle source
# 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'] || ''
  @footer_image                = 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'] || ''
  @facebook_widget             = args['FacebookWidget'] || ''
  @twitter_url                 = args['TwitterURL'] || ''
  @twitter_widget              = args['TwitterWidget'] || ''
  @linked_in_url               = args['LinkedURL'] || ''
  @linked_in_widget            = 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'] || ''
  @side_bar_header_color       = args['SidebarHeaderColor'] || ''
  @button_color                = args['ButtonColor'] || ''
  @button_text_color           = 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