 'use strict'
 
+# when a tag comes up with child nodes, decide which one
+# to create to hold those children
 class Factory
   build: (tag) ->
     switch tag.tag
       when 'CustomObject'
         Builder = SObject
+
+# note the class names are the tag names, but
+#  - capitalized
+#  - trailing 's' removed
       when 'fields', 'nameField'
         Builder = Field
       when 'picklistValues'

      return obj is 'true'
    obj

class Picklist
  constructor: (tag) ->
    @sorted = tag.find('./sorted').text is 'true'

        @actionOverrides[action.actionName] = action

    # smart members
# we'll want some sort of typing system for all fields,
# not just these, but these will be easy, since they
# have so few distinct values over the whole training set.
      when 'sharingModel'
        @sharingModel = new SharingModel value
      when 'deploymentStatus'
        @deploymentStatus = new DeploymentStatus value

# an interesting special case.  how prevalent is this?
      when 'nameField'
        field = factory.build tag
        field.fullName = 'Name'
