Sha256: 5560602da217d23d1df9746f8e2acda9dadafa385fb5af25ce80eec8bbda5217
Contents?: true
Size: 782 Bytes
Versions: 3
Compression:
Stored size: 782 Bytes
Contents
<%= LeapSalesforce.soql_enum_start_text %>.<%= @entity_name %>; /** This file is generated and updated automatically so best not to edit manually * Helps handle picklist values for <%= "#{@entity_name}, #{@enum_name}" %> */ public enum <%= @enum_name %> { <% @enum_values.each_with_index do |value, index| %> <%= value[0].camelize(:upper).to_s %>("<%= value[1] %>")<%= index == @enum_values.length - 1 ? ';' : ',' %><% end%> private String displayName; public String displayName() { return displayName; } @Override public String toString() { return displayName; } <%= @enum_name %>(String displayName) { this.displayName = displayName; } public static <%= @enum_name %> getRandom() { return values()[(int) (Math.random() * values().length)]; } }
Version data entries
3 entries across 3 versions & 1 rubygems