Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Person
- attr_accessor :Name, :Age, :Course
- def initialize(name,age,course)
- @Name=name
- @Age=age
- @Course=course
- end
- end
- Per=Person.new("John","35","Ruby Programming")
- puts Per.Name
- puts Per.Age
- puts Per.Course
- =begin
- OUTPUT:-
- John
- 35
- Ruby Programming
- =end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement