Class: BigCheck::Classifications

Inherits:
Object
  • Object
show all
Defined in:
lib/big_check/classifications.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Classifications

Returns a new instance of Classifications.



5
6
7
8
# File 'lib/big_check/classifications.rb', line 5

def initialize response
  @response = response[:get_ribiz_reference_data_response][:get_ribiz_reference_data_result] ||= {}
  @valid = (@response.empty?) ? false : true
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/big_check/classifications.rb', line 3

def response
  @response
end

Instance Method Details

#invalid?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/big_check/classifications.rb', line 22

def invalid?
  !@valid
end

#professional_groupsObject



10
11
12
# File 'lib/big_check/classifications.rb', line 10

def professional_groups
  return @response[:professional_groups][:professional_group]
end

#type_of_specialismsObject



14
15
16
# File 'lib/big_check/classifications.rb', line 14

def type_of_specialisms
  return @response[:type_of_specialisms][:type_of_specialism]
end

#valid?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/big_check/classifications.rb', line 18

def valid?
  @valid
end