Class: Cb::Models::Industry

Inherits:
ApiResponseModel show all
Defined in:
lib/cb/models/implementations/industry.rb

Instance Attribute Summary collapse

Attributes inherited from ApiResponseModel

#api_response

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Industry

Returns a new instance of Industry.



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

def initialize(args = {})
  @api_response = args
  @code         = args['Code'] || ''
  @name         = args['Name']['#text'] || ''
  @language     = args['Name']['@language'] || ''

  validate_api_response
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



14
15
16
# File 'lib/cb/models/implementations/industry.rb', line 14

def code
  @code
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/cb/models/implementations/industry.rb', line 14

def name
  @name
end