Sha256: 61526298255a8f28094d72ba6b935e2bd0163b2969d32aeecc1a0f8fe6cfa521

Contents?: true

Size: 320 Bytes

Versions: 17

Compression:

Stored size: 320 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

17 entries across 17 versions & 1 rubygems

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