Sha256: 9862e67a407ea8f49a8032b40ad2fc52985815588fccbbf588b99775140ec421

Contents?: true

Size: 386 Bytes

Versions: 12

Compression:

Stored size: 386 Bytes

Contents

function makeCall(path, opts, print) {
  const operation = path.getValue().body[1];

  // Ignoring the next block for coverage information because it's only relevant
  // in Ruby 2.5 and below.
  /* istanbul ignore next */
  if ([".", "&."].includes(operation)) {
    return operation;
  }

  return operation === "::" ? "." : path.call(print, "body", 1);
}

module.exports = makeCall;

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
prettier-1.6.1 src/utils/makeCall.js
prettier-1.6.0 src/utils/makeCall.js
prettier-1.5.5 src/utils/makeCall.js
prettier-1.5.4 src/utils/makeCall.js
prettier-1.5.3 src/utils/makeCall.js
prettier-1.5.2 src/utils/makeCall.js
prettier-1.5.1 src/utils/makeCall.js
prettier-1.5.0 src/utils/makeCall.js
prettier-1.4.0 src/utils/makeCall.js
prettier-1.3.0 src/utils/makeCall.js
prettier-1.2.5 src/utils/makeCall.js
prettier-1.2.4 src/utils/makeCall.js