Skip to content

Instantly share code, notes, and snippets.

@MasoodGit
Created January 4, 2016 09:16
Show Gist options
  • Save MasoodGit/9b9d2ad030c06ee0b423 to your computer and use it in GitHub Desktop.
Save MasoodGit/9b9d2ad030c06ee0b423 to your computer and use it in GitHub Desktop.
Sample class in ruby
class Node
attr_accessor :info , :left , :right
def initialize (info,left,right)
@info = info
@left = left
@right = right
end
end
node1 = Node.new(23,nil,nil)
node2 = Node.new(34,nil,node2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment