Class: Alula::FeaturePlanCloneProc::Response
- Inherits:
-
RpcResponse
- Object
- RpcResponse
- Alula::FeaturePlanCloneProc::Response
- Defined in:
- lib/alula/procedures/feature_plan_clone_proc.rb
Instance Attribute Summary
Attributes inherited from RpcResponse
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #ok? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/alula/procedures/feature_plan_clone_proc.rb', line 13 def initialize(response) super(response) # # This RPC response gives a new FeaturePlan item data = response.data['result'][0] attributes = { id: data['id'], gp_id: data['gp_id'], name: data['name'], description: data['description'], } @data = Alula::FeaturePlan.new(data['id'], attributes) end |
Instance Method Details
#ok? ⇒ Boolean
27 28 29 |
# File 'lib/alula/procedures/feature_plan_clone_proc.rb', line 27 def ok? @result.is_a?(Array) || (@result['errors'].nil? && @result['error'].nil?) end |