1 28 29 package org.jruby.ast.visitor.rewriter; 30 31 import org.jruby.ast.visitor.rewriter.utils.Indentor; 32 33 public class DefaultFormatHelper implements FormatHelper { 34 35 private static final String empty = ""; 36 private static final String oneSpace = " "; 37 Indentor indentor = new Indentor(2, ' '); 38 39 public String getListSeparator() { 40 return ", "; 41 } 42 43 public String beforeCallArguments() { 44 return oneSpace; 45 } 46 47 public String afterCallArguments() { 48 return empty; 49 } 50 51 public String beforeMethodArguments() { 52 return oneSpace; 53 } 54 55 public String afterMethodArguments() { 56 return empty; 57 } 58 59 public String hashAssignment() { 60 return " => "; 61 } 62 63 public String beforeHashContent() { 64 return empty; 65 } 66 67 public String afterHashContent() { 68 return empty; 69 } 70 71 public String matchOperator() { 72 return " =~ "; 73 } 74 75 public String beforeAssignment() { 76 return oneSpace; 77 } 78 79 public String beforeIterBrackets() { 80 return oneSpace; 81 } 82 83 public String afterAssignment() { 84 return oneSpace; 85 } 86 87 public String beforeIterVars() { 88 return empty; 89 } 90 91 public String afterIterVars() { 92 return oneSpace; 93 } 94 95 public String beforeClosingIterBrackets() { 96 return empty; 97 } 98 99 public String classBodyElementsSeparator() { 100 return empty; 101 } 102 103 public Indentor getIndentor() { 104 return indentor; 105 } 106 } | Popular Tags |