6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/apexgen/field/url.rb', line 6
def format(name, o={})
o[:externalId] = o[:externalId] || 'false'
o[:length] = o[:length] || '128'
o[:required] = o[:required] || 'false'
o[:trackHistory] = o[:trackHistory] || 'false'
name_title = name.titleize
"""
<fields>
<fullName>#{name_title.gsub(/\s/, '_')}__c</fullName>
<description>#{name_title} Description</description>
<externalId>#{o[:externalId]}</externalId>
<label>#{name_title}</label>
<length>#{o[:length]}</length>
<required>#{o[:required]}</required>
<trackHistory>#{o[:trackHistory]}</trackHistory>
<type>Url</type>
</fields>
"""
end
|