Skip to content

Instantly share code, notes, and snippets.

@piyush8
Created March 25, 2016 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piyush8/092d87916c19a4035922 to your computer and use it in GitHub Desktop.
Save piyush8/092d87916c19a4035922 to your computer and use it in GitHub Desktop.
module A
def student1
s1 = {name:"piyush",roll_no:111,address:"hyd", subject1:70,subject2:62,subject3:74,subject4:83,subject5:65,subject6:81,total:500,percentage:80}
end
def student2
s2= {name:"ravi",roll_no:112,address:"bngl",subject1:87,subject2:78,subject3:66,subject4:68,subject5:95,subject6:71,total:542,percentage:82}
end
end
class Stnd
include A
end
s = Stnd.new
p s.student1[:percentage]
p s.student2[:percentage]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment