def define(collection_name, element_name = nil)
      element_name ||= singular(collection_name, element_name)
      create_collection_class(collection_name.to_s.capitalize)
      create_element_class(collection_name.to_s.capitalize, element_name.capitalize)

      # def subnets
      #   @subnets ||= Foggy::Networking::Subnets.new("subnet")
      # end
      klass = self.const_get(collection_name.capitalize)
      define_method("#{collection_name}") do
        unless instance_variable_defined?("@#{collection_name}")
          instance_variable_set("@#{collection_name}", klass.new(element_name))
        end
        return instance_variable_get("@#{collection_name}")
      end
    end
def define(collection_name, element_name = nil)
      element_name ||= singular(collection_name, element_name)
      create_collection_class(collection_name.to_s.capitalize)
      create_element_class(collection_name.to_s.capitalize, element_name.capitalize)

      # def subnets
      #   @subnets ||= Foggy::Networking::Subnets.new("subnet")
      # end
      klass = self.const_get(collection_name.capitalize)
      define_method("#{collection_name}") do
        unless instance_variable_defined?("@#{collection_name}")
          instance_variable_set("@#{collection_name}", klass.new(element_name))
        end
        return instance_variable_get("@#{collection_name}")
      end
    end
Unless an element_name is provided, the singular name of a collection is deducted from its collection name:
 - When a name ends with 'ies' it will be replaced with 'y'
 - Otherwise the last letter is removed