Class: Vueport::Renderer

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers::TagHelper
Defined in:
lib/vueport/renderer.rb

Constant Summary collapse

CONTENT_WRAPPER_ID =
'vueport-wrapper'.freeze
TEMPLATE_ID =
'vueport-template'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, path: '/') ⇒ Renderer

Returns a new instance of Renderer.



10
11
12
13
# File 'lib/vueport/renderer.rb', line 10

def initialize(content, path: '/')
  self.content = content
  self.path = path
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



8
9
10
# File 'lib/vueport/renderer.rb', line 8

def content
  @content
end

#pathObject

Returns the value of attribute path.



8
9
10
# File 'lib/vueport/renderer.rb', line 8

def path
  @path
end

Instance Method Details

#renderObject



15
16
17
# File 'lib/vueport/renderer.rb', line 15

def render
  safe_join [rendered_content, template]
end