Class: Cb::CbEducation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ CbEducation

This object stores Education Codes having to do with a country. The API objects dealing with job, will populate one or many of this object.

For more information, please visit: http://api.careerbuilder.com/v1/educationcodes



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cb/models/implementations/cb_education.rb', line 13

def initialize(args = {})
  return if args.nil?

  @code          = args['Code'] || ''
  @language      = args['Name']['@language'] unless args['Name'].nil?
  @text          = args['Name']['#text'] unless args['Name'].nil?

  # I have got to find a better way to do this
  @language ||= ''
  @text ||= ''
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/cb/models/implementations/cb_education.rb', line 3

def code
  @code
end

#languageObject

Returns the value of attribute language.



3
4
5
# File 'lib/cb/models/implementations/cb_education.rb', line 3

def language
  @language
end

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/cb/models/implementations/cb_education.rb', line 3

def text
  @text
end