Sha256: 9fff368db15d0a7dc11d54da51187be78e466a24c94e487a26b4f94eae7bbee7

Contents?: true

Size: 317 Bytes

Versions: 1

Compression:

Stored size: 317 Bytes

Contents

module AngularSprinkles
  module Directive
    class Input
      def initialize(args = {})
        @args = args.symbolize_keys
      end

      def attributes
        { data: to_json_hash }
      end

      private

      def to_json_hash
        Hash[@args.map { |k, v| [k, v.to_json] }]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
angular_sprinkles-0.0.7 lib/angular_sprinkles/directive/input.rb