Class: Karafka::Web::Ui::Controllers::Responses::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/web/ui/controllers/responses/data.rb

Overview

Response data object. It is used to transfer attributes assigned in controllers into views It acts as a simplification / transport layer for assigned attributes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, attributes) ⇒ Data

Returns a new instance of Data.

Parameters:

  • path (String)

    render path

  • attributes (Hash)

    attributes assigned in the controller



17
18
19
20
# File 'lib/karafka/web/ui/controllers/responses/data.rb', line 17

def initialize(path, attributes)
  @path = path
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



13
14
15
# File 'lib/karafka/web/ui/controllers/responses/data.rb', line 13

def attributes
  @attributes
end

#pathObject (readonly)

Returns the value of attribute path.



13
14
15
# File 'lib/karafka/web/ui/controllers/responses/data.rb', line 13

def path
  @path
end