Class: Dandy::ViewBuilders::Json
- Inherits:
-
Dandy::ViewBuilder
- Object
- Dandy::ViewBuilder
- Dandy::ViewBuilders::Json
- Defined in:
- lib/dandy/view_builders/json.rb
Instance Method Summary collapse
Methods inherited from Dandy::ViewBuilder
Constructor Details
This class inherits a constructor from Dandy::ViewBuilder
Instance Method Details
#build ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dandy/view_builders/json.rb', line 7 def build result = Jbuilder.new do |json| if @options[:keys_format] == 'camel' json.key_format! camelize: :lower end eval(@template) end result.target! end |