I have no problems with a sigil giving both the interpreter and myself scope information, and since Ruby is a very dynamic language without any sort of variable declarations I don't see how else the interpreter could determine scope, but if you never want to see the @ sign again, here you go...
class Klass Object
# create instance variables @num1 & @num2,
# instance accessors Klass#num1 & Klass#num2,
# and instance mutators Klass#num1= & Klass#num2=
attr_accessor:num1,:num2
def add_nums
var1 + var2 # note, these are method calls
end end
I have no problems with a sigil giving both the interpreter and myself scope information, and since Ruby is a very dynamic language without any sort of variable declarations I don't see how else the interpreter could determine scope, but if you never want to see the @ sign again, here you go...
:num1, :num2
class Klass Object
# create instance variables @num1 & @num2,
# instance accessors Klass#num1 & Klass#num2,
# and instance mutators Klass#num1= & Klass#num2=
attr_accessor
def add_nums
var1 + var2 # note, these are method calls
end
end