Open alloy opened 10 years ago
Note that the set_
convention is used to denote when the setter is decorated with further behaviour
def set_source_tree(object, source_tree)
source_tree = normalize_source_tree(source_tree)
object.source_tree = source_tree
end
I don’t think the user of the API should need to know of that, though. After that, it just looks like Java or Objective-C before dot-notation :D
Good point… for the record, the is also another intent: to not override the dynamically generated setters for the Xcodeproj’s attributes.
Fair enough, but we should really just be using super
or something like write_attribute(name, value)
like in ActiveRecord. Obviously the former would be much nicer.
:+1:
There are tons of methods that are using the form
set_foo
, which is not idiomatic Ruby, these should be using the formfoo=
instead.