Created
January 4, 2016 09:16
-
-
Save MasoodGit/9b9d2ad030c06ee0b423 to your computer and use it in GitHub Desktop.
Sample class in ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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