Open atg opened 8 years ago
Input
class Barney: def __init__(self): self.status = 'not ok' barney = Barney() barney.status = "ok" print(barney.status)
Output
class Barney def initialize @status = 'not ok' end end barney = Barney.new barney.status = 'ok' puts barney.status
Error
undefined methodstatus=' for #<Barney:0x007f837084d190 @status="not ok"> (NoMethodError)`
undefined method
attr_reader
attr_writer
attr_accessor
Input
Output
Error
undefined method
status=' for #<Barney:0x007f837084d190 @status="not ok"> (NoMethodError)`