Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person
- attr_accessor :Name, :Age, :Course #attributes of a class
- end
- Per=Person.new() #creating new object
- Per.Name="John"
- Per.Age="75"
- Per.Course="Ruby Programming"
- puts Per.Name
- puts Per.Age
- puts Per.Course
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement