Sha256: e42d05ccc13697d6f163bb7a132412fc6bacc4770dff4f4d941b9fc357efccab
Contents?: true
Size: 521 Bytes
Versions: 3
Compression:
Stored size: 521 Bytes
Contents
module AngularSprinkles module Mixins module JsTransformable def to_ctrl_variable(str) "#{AngularSprinkles::CONTROLLER_NAME}.#{str}" end def set_prototype_variable(key, value) or_equals_js(to_ctrl_prototype_variable(key), value) end private def or_equals_js(key, value) "#{key} = #{key} || #{value.to_json}"; end def to_ctrl_prototype_variable(str) "#{AngularSprinkles::CONTROLLER_FN}.prototype.#{str}" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems