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
234 235 236 237 238 239 |
# File 'lib/spotlight/engine.rb', line 234 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 |