Class: Cb::Models::Company

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/models/implementations/company.rb

Defined Under Namespace

Classes: Address

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Company

Returns a new instance of Company.



23
24
25
26
27
28
29
30
31
32
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
# File 'lib/cb/models/implementations/company.rb', line 23

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
  ################################################################
                          = 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.has_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

Instance Attribute Details

#addressesObject

Returns the value of attribute addresses.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def addresses
  @addresses
end

#benefitsObject

Returns the value of attribute benefits.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def benefits
  @benefits
end

#benefits_labelObject

Returns the value of attribute benefits_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def benefits_label
  @benefits_label
end

#bright_cove_videoObject

Returns the value of attribute bright_cove_video.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def bright_cove_video
  @bright_cove_video
end

#bulletin_boardObject

Returns the value of attribute bulletin_board.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def bulletin_board
  @bulletin_board
end

#button_colorObject

Returns the value of attribute button_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def button_color
  @button_color
end

#button_text_colorObject

Returns the value of attribute button_text_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def button_text_color
  @button_text_color
end

#career_oppsObject

Returns the value of attribute career_opps.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def career_opps
  @career_opps
end

#career_opps_labelObject

Returns the value of attribute career_opps_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def career_opps_label
  @career_opps_label
end

#collegeObject

Returns the value of attribute college.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def college
  @college
end

#college_labelObject

Returns the value of attribute college_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def college_label
  @college_label
end

#contactObject

Returns the value of attribute contact.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def contact
  @contact
end

#contact_labelObject

Returns the value of attribute contact_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def contact_label
  @contact_label
end

#cultureObject

Returns the value of attribute culture.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def culture
  @culture
end

#culture_labelObject

Returns the value of attribute culture_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def culture_label
  @culture_label
end

#didObject

Returns the value of attribute did.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def did
  @did
end

#diversityObject

Returns the value of attribute diversity.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def diversity
  @diversity
end

#diversity_labelObject

Returns the value of attribute diversity_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def diversity_label
  @diversity_label
end

#extra_custom_tabObject

Returns the value of attribute extra_custom_tab.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def extra_custom_tab
  @extra_custom_tab
end

#facebook_urlObject

Returns the value of attribute facebook_url.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def facebook_url
  @facebook_url
end

#facebook_widgetObject

Returns the value of attribute facebook_widget.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def facebook_widget
  @facebook_widget
end

Returns the value of attribute footer_image.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def footer_image
  @footer_image
end

#gutter_bg_colorObject

Returns the value of attribute gutter_bg_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def gutter_bg_color
  @gutter_bg_color
end

#header_imageObject

Returns the value of attribute header_image.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def header_image
  @header_image
end

#headquartersObject

Returns the value of attribute headquarters.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def headquarters
  @headquarters
end

#hh_nameObject

Returns the value of attribute hh_name.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def hh_name
  @hh_name
end

#historyObject

Returns the value of attribute history.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def history
  @history
end

#host_sitesObject

Returns the value of attribute host_sites.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def host_sites
  @host_sites
end

#image_fileObject

Returns the value of attribute image_file.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def image_file
  @image_file
end

#industryObject

Returns the value of attribute industry.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def industry
  @industry
end

#info_tabsObject

Returns the value of attribute info_tabs.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def info_tabs
  @info_tabs
end

#is_enhanceObject

Returns the value of attribute is_enhance.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def is_enhance
  @is_enhance
end

#is_militaryObject

Returns the value of attribute is_military.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def is_military
  @is_military
end

#is_premiumObject

Returns the value of attribute is_premium.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def is_premium
  @is_premium
end

#linked_in_urlObject

Returns the value of attribute linked_in_url.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def linked_in_url
  @linked_in_url
end

#linked_in_widgetObject

Returns the value of attribute linked_in_widget.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def linked_in_widget
  @linked_in_widget
end

Returns the value of attribute links.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def links
  @links
end

#logoObject

Returns the value of attribute logo.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def 
  
end

#my_content_tabsObject

Returns the value of attribute my_content_tabs.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def my_content_tabs
  @my_content_tabs
end

#my_photosObject

Returns the value of attribute my_photos.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def my_photos
  @my_photos
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def name
  @name
end

#news_feedObject

Returns the value of attribute news_feed.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def news_feed
  @news_feed
end

#overviewObject

Returns the value of attribute overview.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def overview
  @overview
end

#peopleObject

Returns the value of attribute people.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def people
  @people
end

#people_labelObject

Returns the value of attribute people_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def people_label
  @people_label
end

#photosObject

Returns the value of attribute photos.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def photos
  @photos
end

#productsObject

Returns the value of attribute products.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def products
  @products
end

#products_labelObject

Returns the value of attribute products_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def products_label
  @products_label
end

#s_driveObject

Returns the value of attribute s_drive.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def s_drive
  @s_drive
end

Returns the value of attribute side_bar_header_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def side_bar_header_color
  @side_bar_header_color
end

#sizeObject

Returns the value of attribute size.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def size
  @size
end

#tab_header_bg_colorObject

Returns the value of attribute tab_header_bg_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def tab_header_bg_color
  @tab_header_bg_color
end

#tab_header_hover_colorObject

Returns the value of attribute tab_header_hover_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def tab_header_hover_color
  @tab_header_hover_color
end

#tab_header_text_colorObject

Returns the value of attribute tab_header_text_color.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def tab_header_text_color
  @tab_header_text_color
end

#testimonialsObject

Returns the value of attribute testimonials.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def testimonials
  @testimonials
end

#total_jobsObject

Returns the value of attribute total_jobs.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def total_jobs
  @total_jobs
end

#twitter_urlObject

Returns the value of attribute twitter_url.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def twitter_url
  @twitter_url
end

#twitter_widgetObject

Returns the value of attribute twitter_widget.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def twitter_widget
  @twitter_widget
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def type
  @type
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def url
  @url
end

#visionObject

Returns the value of attribute vision.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def vision
  @vision
end

#vision_labelObject

Returns the value of attribute vision_label.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def vision_label
  @vision_label
end

#year_foundedObject

Returns the value of attribute year_founded.



4
5
6
# File 'lib/cb/models/implementations/company.rb', line 4

def year_founded
  @year_founded
end