class Customer
def initialize(id, name, addr)
@cust_id = id
@cust_name = name
@cust_addr = addr
end
def display_details
puts "Customer id #{@cust_id}"
puts "Customer name #{@cust_name}"
puts "Customer address #{@cust_addr}"
end
end
+------------------+----------------------+
| Name Begins With | Variable Scope |
+------------------+----------------------+
| $ | A global variable |
| @ | An instance variable |
| [a-z] or _ | A local variable |
| [A-Z] | A constant |
| @@ | A class variable |
+------------------+----------------------+