Sha256: d1ac49465de3ec12691e8bd355c82e8d7d62440bd7a5d38195ecb77fadbff482
Contents?: true
Size: 639 Bytes
Versions: 12
Compression:
Stored size: 639 Bytes
Contents
module ExpressTemplates module Components module Capabilities # Adds the capability for a component to render itself in a context. # # Provides both: # # * Rendering::ClassMethods # * Rendering::InstanceMethods # # Used in ExpressTemplates::Components::Base. # module Rendering def self.included(base) base.class_eval do extend ClassMethods end end module ClassMethods def render_in(context, &view_code) context.instance_eval(&view_code) end end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems