diff --git a/Using-Liquid-without-Rails.textile b/Using-Liquid-without-Rails.textile index 6274050..0be604a 100644 --- a/Using-Liquid-without-Rails.textile +++ b/Using-Liquid-without-Rails.textile @@ -62,4 +62,17 @@ Run that again and presto:
I'm running to the store with 20 dollars in my pocket to buy a box of sausages.
+However, that's a bit verbose, so you may want to use @liquid_methods@, instead:
+
+class Product
+ attr_accessor :name, :price
+ liquid_methods :name, :price
+
+ def initialize(name, price)
+ @name = name
+ @price = price
+ end
+end
+
+
(Thanks to "Tom's":http://github.com/mojombo "Jekyll":http://github.com/mojombo/jekyll/tree/master/lib/jekyll/post.rb#L122-128 code for helping me figuring this out.)
\ No newline at end of file