Sha256: 610851a6142958d3620ed7b44954ab114248d30b762ea74c2907630e32af6118

Contents?: true

Size: 344 Bytes

Versions: 4

Compression:

Stored size: 344 Bytes

Contents

require 'angular_sprinkles/mixins/js_transformable'

module AngularSprinkles
  module Data
    class Bind
      include Mixins::JsTransformable

      def initialize(*strs)
        @strs = strs.flatten.compact
      end

      def to_json
        to_ctrl_variable(@strs.join('.'))
      end
      alias_method :to_s, :to_json
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
angular_sprinkles-0.0.4 lib/angular_sprinkles/data/bind.rb
angular_sprinkles-0.0.3 lib/angular_sprinkles/data/bind.rb
angular_sprinkles-0.0.2 lib/angular_sprinkles/data/bind.rb
angular_sprinkles-0.0.1 lib/angular_sprinkles/data/bind.rb