5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/helpers/kirgudu_base/models/mergeable_elements.rb', line 5
def mergeable_attributes(*args)
@mergeable_attributes = self.get_mergeable_attributes
options = args. || {}
args.each do |argument|
unless argument.is_a?(Symbol)
raise "Class: #{self} <br/>Mergable Attributes must be of Symbol Class".html_safe
end
if @mergeable_attributes.include?(argument)
raise "Class: #{self} <br/>Attribute '#{argument}' already added to Mergable for this Class".html_safe
end
@mergeable_attributes << argument
end
end
|