spec/support/plugins/my_plugin.rb in locomotive_plugins-1.0.0.beta4 vs spec/support/plugins/my_plugin.rb in locomotive_plugins-1.0.0.beta5
- old
+ new
@@ -2,17 +2,24 @@
module Locomotive
class MyPlugin
include Locomotive::Plugin
module Filters
+ def filter(input)
+ input
+ end
end
class MyDrop < ::Liquid::Drop
end
+ class MyTag < ::Liquid::Tag
+ end
+
before_filter :my_method1
- before_filter :my_method2
+ after_filter :my_method2
+ around_filter :my_method3
attr_accessor :custom_attribute
def initialize_plugin
self.custom_attribute = 'Value'
@@ -29,14 +36,22 @@
def self.liquid_filters
Filters
end
+ def self.liquid_tags
+ { 'my_tag' => MyTag }
+ end
+
def my_method1
- 'This is my first before filter!'
+ 'This is my before filter!'
end
def my_method2
- 'This is my second before filter!'
+ 'This is my after filter!'
+ end
+
+ def my_method3
+ 'This is my around filter!'
end
end
end