03 Oct 2009, 14:19
Generic-user-small

Toby Joiner (3 posts)

I am confused about the code on page 63. It says:

  def initialize(title, price)
    @title, @price = title, price
  end

Could someone explain what this is doing? The php code doesn’t reference anything like @price = title. I know I am just confused.

Thanks for any help,

Toby

26 Oct 2009, 20:49
Generic-user-small

Toby Joiner (3 posts)

So I guess I wasn’t worthy of a response. I asked on another forum that was actually helpful, and thought I would post what it is here for people that come to this site.

I was mistaken that @price was being assigned to title, but actually it is @title = title @price = price

just in one line of code to make it easier.

Thanks for helping me decide where not to come for help,

book is sold, no need to help people after that…

27 Oct 2009, 00:22
Derek_pragsmall

Derek DeVries (18 posts)

Toby,

Sorry about that. We’ve tried our best to monitor these forums, and have answered every other post on this forum in a timely manner. Somehow your question slipped by us, and we apologize for that. I’m glad that you were able to find an answer to your question.

If you have any other questions about the book feel free to email me directly at derek@maintainable.com or send me a twitter message @devrieda.

Regards, Derek

  You must be logged in to comment