Class: BigCheck::Classifications
- Inherits:
-
Object
- Object
- BigCheck::Classifications
- Defined in:
- lib/big_check/classifications.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Classifications
constructor
A new instance of Classifications.
- #invalid? ⇒ Boolean
- #professional_groups ⇒ Object
- #type_of_specialisms ⇒ Object
- #valid? ⇒ Boolean
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
#response ⇒ Object
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
22 23 24 |
# File 'lib/big_check/classifications.rb', line 22 def invalid? !@valid end |
#professional_groups ⇒ Object
10 11 12 |
# File 'lib/big_check/classifications.rb', line 10 def professional_groups return @response[:professional_groups][:professional_group] end |
#type_of_specialisms ⇒ Object
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
18 19 20 |
# File 'lib/big_check/classifications.rb', line 18 def valid? @valid end |