Fixed bug: Using alias causes error for inheriting Units because the old method is called instead of the one of the sub-class.

This commit is contained in:
Thorsten Eckel 2017-12-20 15:45:39 +01:00
parent 0ce0a9c06e
commit 59d642faa5

View file

@ -25,7 +25,12 @@ class Sequencer
def attribute
raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'"
end
alias attributes attribute
def attributes
# alias or alias_method won't work if attribute method
# is overwritten in inheriting sub-class
attribute
end
def existing_instance
@existing_instance ||= begin