Sha256: d96191379d72d32bf288914d03505ddc3b4354a07d4a69a24ac93a785d4a2d12
Contents?: true
Size: 585 Bytes
Versions: 45
Compression:
Stored size: 585 Bytes
Contents
require 'parser/current' require 'ruby2js/filter/angularrb' module Ruby2JS module Filter module AngularResource include SEXP # input: # $resource.new(args) # # output: # $resource(args) def on_send(node) return super unless @ngApp and node.children[1] == :new return super unless node.children[0] == s(:gvar, :$resource) node = super(node) @ngAppUses << :ngResource node.updated nil, [nil, :$resource, *node.children[2..-1]] end end DEFAULTS.push AngularResource end end
Version data entries
45 entries across 45 versions & 1 rubygems