Class: Chaplin::InlinePartial

Inherits:
Struct
  • Object
show all
Defined in:
lib/chaplin/inline_partial.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



4
5
6
# File 'lib/chaplin/inline_partial.rb', line 4

def content
  @content
end

Instance Method Details

#render(chaplin_request_params) ⇒ Object



6
7
8
9
# File 'lib/chaplin/inline_partial.rb', line 6

def render(chaplin_request_params)
  full_params = chaplin_request_params.merge(env: ENV)
  Mustache.render(content, full_params)
end