end
that normal?
You need an explicit self, ie. self.value = data. Without the self,
Ruby
interprets that line as a local variable assignment, not a method call.
|
| end
|that normal?
|
|Thanl you for your help.
|
Because when ruby sees something like:
identifier = value
it thinks you’re creating a local variable called identifier, not
calling the
identifier= method. To force ruby to understand you want to call the
method,
you need to use the dot notation, self.identifier = value, or use send:
send(:identifier=, value).