Class: Cb::Models::JobBranding
- Inherits:
-
Object
- Object
- Cb::Models::JobBranding
- Defined in:
- lib/cb/models/implementations/job_branding.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#company_description ⇒ Object
Returns the value of attribute company_description.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#id ⇒ Object
Returns the value of attribute id.
-
#media ⇒ Object
Returns the value of attribute media.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sections ⇒ Object
Returns the value of attribute sections.
-
#show_widgets ⇒ Object
Returns the value of attribute show_widgets.
-
#styles ⇒ Object
Returns the value of attribute styles.
-
#type ⇒ Object
Returns the value of attribute type.
-
#widgets ⇒ Object
Returns the value of attribute widgets.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ JobBranding
constructor
A new instance of JobBranding.
Constructor Details
#initialize(args = {}) ⇒ JobBranding
Returns a new instance of JobBranding.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/cb/models/implementations/job_branding.rb', line 16 def initialize(args = {}) @name = args['Name'] || '' @id = args['Id'] || '' @account_id = args['AccountId'] || '' @type = args['Type'] || '' @media = Branding::Media.new args['Media'] @styles = Branding::Style.new args['Styles'] @errors = args['Errors'] || '' @company_description = args['CompanyDescription'] || '' @sections = [] @widgets = [] args['Sections'].each do |type, sections| @sections << Branding::Section.new(type, sections) unless sections.nil? end args['Widgets'].each do |type, url| if type == 'ShowWidgets' @show_widgets = url == 'true' else @widgets << Branding::Widget.new(type, url) unless url.nil? end end end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def account_id @account_id end |
#company_description ⇒ Object
Returns the value of attribute company_description.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def company_description @company_description end |
#errors ⇒ Object
Returns the value of attribute errors.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def errors @errors end |
#id ⇒ Object
Returns the value of attribute id.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def id @id end |
#media ⇒ Object
Returns the value of attribute media.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def media @media end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def name @name end |
#sections ⇒ Object
Returns the value of attribute sections.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def sections @sections end |
#show_widgets ⇒ Object
Returns the value of attribute show_widgets.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def @show_widgets end |
#styles ⇒ Object
Returns the value of attribute styles.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def styles @styles end |
#type ⇒ Object
Returns the value of attribute type.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def type @type end |
#widgets ⇒ Object
Returns the value of attribute widgets.
14 15 16 |
# File 'lib/cb/models/implementations/job_branding.rb', line 14 def @widgets end |