Arlington Ruby Message Board › Help.... What am I doing wrong...

Help.... What am I doing wrong...

Sis Summer J.
user 97887392
Washington, DC
Post #: 8
confused

class BankAccount
def full_name(first_name, last_name)
return first_name + " " + last_name
end
end
Sean M.
SeanMarcia
Arlington, VA
Post #: 13
Is this an excerpt or the whole class? Where is the first_name and last_name coming from?

To get this to work as written, you could do something like:
class BankAccount
attr_accessor :first_name, :last_name

def full_name
"#{first_name} #{last_name}"
end
end

Feel free to bring your code by the meetup on Wednesday if you are coming and I'd be happy to help or walk you through things.
Powered by mvnForum

Our Sponsors

  • Clean Ruby

    Get the ebook by Jim Gay about Ruby, OOP, and DCI

  • O'Reilly

    Discounts on print and ebooks.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy