Sha256: 36215b7859073243d23a9f92c6f11a947fa3f3d3d9bba27302c28d6f23e9904b
Contents?: true
Size: 518 Bytes
Versions: 17
Compression:
Stored size: 518 Bytes
Contents
module AngularSprinkles module Helpers module DirectiveHelper def directive(directive_name, options = {}, &block) content = capture(&block) if block_given? name = Directive::Name.new(directive_name) input = Directive::Input.new(options.except(:html)) html = Directive::Html.new(options[:html]) attributes = Directive::Attributes.new([name, input, html], tag: html.tag, content: content) content_tag(*attributes.to_content_tag) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems