lib/jcompiler.rb in jcompiler-0.1.12 vs lib/jcompiler.rb in jcompiler-0.1.13
- old
+ new
@@ -1,16 +1,20 @@
class Jcompiler
- def self.code
- "{\"a\":\"b\"}"
+ def self.a
+
end
+
+ def self.code(brands)
+ "{\"a\":#{brands.length}}"
+ end
end
class JcompilerHandler
cattr_accessor :default_format
self.default_format = Mime::JSON
def self.call(template)
- %{Jcompiler.code}
+ "Jcompiler.code(@brands)"
end
end
ActionView::Template.register_template_handler :jcompiler, JcompilerHandler