Class: Api::ResponseBuilder::Status

Inherits:
Base
  • Object
show all
Defined in:
lib/api/response_builder/status.rb

Overview

Class which helps in building status of api response

Instance Attribute Summary collapse

Attributes inherited from Base

#config, #resource

Instance Method Summary collapse

Constructor Details

#initialize(resource, config = {}) ⇒ Status

Returns a new instance of Status.



8
9
10
11
12
# File 'lib/api/response_builder/status.rb', line 8

def initialize(resource, config = {})
  super(resource, config)
  @status_message = { status: "success" }
  set_status_message
end

Instance Attribute Details

#status_messageObject

Returns the value of attribute status_message.



6
7
8
# File 'lib/api/response_builder/status.rb', line 6

def status_message
  @status_message
end