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

Version Path
angular_sprinkles-0.2.10 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.9 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.8 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.7 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.6 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.5 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.4 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.3 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.2 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.1 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.2.0 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.1.1 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.1.0 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.0.9 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.0.8 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.0.7 lib/angular_sprinkles/helpers/directive_helper.rb
angular_sprinkles-0.0.6 lib/angular_sprinkles/helpers/directive_helper.rb