Class: CPApiReturn
- Inherits:
-
Object
- Object
- CPApiReturn
- Defined in:
- lib/crowi/client/apireq/api_request_base.rb
Overview
APIリクエストの応答基本クラス
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#ok ⇒ Object
Returns the value of attribute ok.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ CPApiReturn
constructor
Constractor.
Constructor Details
#initialize(params = {}) ⇒ CPApiReturn
Constractor
25 26 27 28 29 30 31 |
# File 'lib/crowi/client/apireq/api_request_base.rb', line 25 def initialize(params = {}) if (! params[:ok].is_a?(TrueClass) && ! params[:ok].is_a?(FalseClass)) raise ArgumentError.new('Parameter ok is needed true or false.') end @ok = params[:ok] @data = params[:data] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
21 22 23 |
# File 'lib/crowi/client/apireq/api_request_base.rb', line 21 def data @data end |
#ok ⇒ Object
Returns the value of attribute ok.
21 22 23 |
# File 'lib/crowi/client/apireq/api_request_base.rb', line 21 def ok @ok end |