From: Rubyist Rohit Date: 2012-09-01T15:18:56+09:00 Subject: Constructor or a Method Take for instance this code: ======== [CODE] ======= def Customer attr_accessor :name def name @name end def name(=str) @name = str end end ======================= I want to know: (1) Is 'name' a constructor or a method? (2) In case I ignore '=' in second method, will it work? Why '=' is necessary? -- Posted via http://www.ruby-forum.com/.