Class: Spotlight::Engine::TranslationYamlHandler
- Inherits:
-
Object
- Object
- Spotlight::Engine::TranslationYamlHandler
- Defined in:
- lib/spotlight/engine.rb
Overview
Copy of JbuilderHandler tweaked to spit out YAML for translation exports
Class Method Summary collapse
Class Method Details
.call(template, source = nil) ⇒ Object
230 231 232 233 234 235 |
# File 'lib/spotlight/engine.rb', line 230 def self.call(template, source = nil) source ||= template.source # this juggling is required to keep line numbers right in the error %{__already_defined = defined?(json); json||=JbuilderTemplate.new(self); #{source} json.attributes!.to_yaml unless (__already_defined && __already_defined != "method")} end |