Class: Api::ResponseBuilder::Data

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

Overview

Class which helps in building api response body

Instance Attribute Summary collapse

Attributes inherited from Base

#config, #resource

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Data.



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

def initialize(resource, config = {})
  super(resource, config)
  @data = nil
  set_data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



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

def data
  @data
end