Sha256: b4c9e725062929945839972e691987ed7ea2713e59793d6dc449ce4d576f467f

Contents?: true

Size: 362 Bytes

Versions: 22

Compression:

Stored size: 362 Bytes

Contents

module AngularSprinkles
  module Directive
    class Attributes
      def initialize(args, options)
        @args = args
        @content = options.fetch(:content, '')
        @tag = options[:tag] || :div
      end

      def to_content_tag
        attrs = @args.map(&:attributes).inject(&:deep_merge)
        [@tag, @content, attrs]
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
angular_sprinkles-0.2.14 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.13 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.12 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.11 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.10 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.9 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.8 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.7 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.6 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.5 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.4 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.3 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.2 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.1 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.2.0 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.1.1 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.1.0 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.0.9 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.0.8 lib/angular_sprinkles/directive/attributes.rb
angular_sprinkles-0.0.7 lib/angular_sprinkles/directive/attributes.rb