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.



7
8
9
10
11
12
13
14
# File 'lib/cb/models/implementations/industry.rb', line 7

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

  validate_api_response
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



5
6
7
# File 'lib/cb/models/implementations/industry.rb', line 5

def code
  @code
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/cb/models/implementations/industry.rb', line 5

def name
  @name
end