Skip to content

Instantly share code, notes, and snippets.

@rippinrobr
Created November 18, 2010 13:41
Show Gist options
  • Save rippinrobr/704982 to your computer and use it in GitHub Desktop.
Save rippinrobr/704982 to your computer and use it in GitHub Desktop.
def add_field(name, type, attributes = MemberAttributes.Public)
field = CodeMemberField.new
field.Attributes = attributes
field.Name = name
field.Type = CodeTypeReference.new type
field.Comments.Add( CodeCommentStatement.new("Repository"))
@target_class.Members.Add(field)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment