Class: RainbowLiquid::Colors
- Inherits:
-
Object
- Object
- RainbowLiquid::Colors
- Defined in:
- lib/rainbow_liquid/colors.rb
Class Method Summary collapse
Class Method Details
.load! ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rainbow_liquid/colors.rb', line 6 def load! (colors + effects).each do |color| tag_class = Class.new(Liquid::Block) do define_method(:render) do |context| content = super(context) Rainbow(content).public_send(color) end end env.register_tag(color, tag_class) end end |