class MoreViewHooks::Hook
Describes a preconfigured view hook which will be later applied by using the elegant Deface gem
Attributes
deface_options[R]
Public Class Methods
new(hook_name, context, options)
click to toggle source
# File lib/more_view_hooks/hook.rb, line 7 def initialize(hook_name, context, options) @deface_options = options.merge( text: "<%= call_hook(:#{hook_name}, #{context || '{}'}) %>", name: "more_view_hooks_#{hook_name}" ) end
Public Instance Methods
apply!()
click to toggle source
# File lib/more_view_hooks/hook.rb, line 14 def apply! Deface::Override.new(deface_options) end