Method: Type#set_scs

Defined in:
lib/tecsgen/core/types.rb

#set_scs(size, count, string, max = nil, b_nullable = false) ⇒ Object

size_is, count_is, string を設定

派生クラスでオーバーライドする(デフォルトではエラー)



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/tecsgen/core/types.rb', line 116

def set_scs(size, count, string, max = nil, b_nullable = false)
  str = ""
  delim = ""
  if size
    str = "size_is"
    delim = ", "
  end
  if count
    str = "#{str}#{delim}count_is"
    delim = ", "
  end
  if string
    str = "#{str}#{delim}string"
    delim = ", "
  end
  if b_nullable
    str = "#{str}#{delim}nullable"
    delim = ", "
  end
  cdl_error("T1003 $1: unsuitable specifier for $2", str, self.class)
end