Sha256: 1df8fedb83078268bc907cf1d00d5c74f0fb5ee1bbc9c4b35273d64e6727fdbd
Contents?: true
Size: 374 Bytes
Versions: 1
Compression:
Stored size: 374 Bytes
Contents
module AngularSprinkles module Directive class Input def initialize(args) @args = (args || {}) end def attributes { data: to_json_hash } end private def to_json_hash Hash[@args.map do |k, v| [k.to_s.underscore.dasherize, v.is_a?(String) ? v : v.to_json] end] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
angular_sprinkles-0.2.14 | lib/angular_sprinkles/directive/input.rb |