Class: Karafka::Web::Ui::Controllers::Responses::Render

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

Overview

Response render 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) ⇒ Render

Returns a new instance of Render.

Parameters:

  • path (String)

    render path

  • attributes (Hash)

    attributes assigned in the controller



17
18
19
20
# File 'lib/karafka/web/ui/controllers/responses/render.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/render.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/render.rb', line 13

def path
  @path
end