Class: OrcaApi::MedicalPracticeService::ResponseResult
- Defined in:
- lib/orca_api/medical_practice_service.rb
Overview
診療行為APIのレスポンスクラスの基底クラス
Direct Known Subclasses
Direct Known Subclasses
Constant Summary
Constants inherited from Result
Instance Attribute Summary
Attributes inherited from Result
Instance Method Summary collapse
-
#initialize(raw, ignore_medical_warnings = nil) ⇒ ResponseResult
constructor
A new instance of ResponseResult.
-
#ok? ⇒ Boolean
APIレスポンスに警告コードが含まれていればfalseを返す。それ以外の場合は、 OrcaApi::Result#ok? を呼び出す.
Methods inherited from Result
#[], #body, def_info, #locked?, #message, #method_missing, parse, #respond_to_missing?, trim_response, #warning?
Constructor Details
#initialize(raw, ignore_medical_warnings = nil) ⇒ ResponseResult
Returns a new instance of ResponseResult
84 85 86 87 |
# File 'lib/orca_api/medical_practice_service.rb', line 84 def initialize(raw, ignore_medical_warnings = nil) super(raw) @ignore_medical_warnings = Array[ignore_medical_warnings].flatten.compact end |
Constructor Details
#initialize(raw, ignore_medical_warnings = nil) ⇒ ResponseResult
Returns a new instance of ResponseResult
84 85 86 87 |
# File 'lib/orca_api/medical_practice_service.rb', line 84 def initialize(raw, ignore_medical_warnings = nil) super(raw) @ignore_medical_warnings = Array[ignore_medical_warnings].flatten.compact end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OrcaApi::Result
Instance Method Details
#ok? ⇒ Boolean
APIレスポンスに警告コードが含まれていればfalseを返す。それ以外の場合は、 OrcaApi::Result#ok? を呼び出す
91 92 93 |
# File 'lib/orca_api/medical_practice_service.rb', line 91 def ok? warning_codes.empty? ? super : false end |