Module: Sweet::Component::ClassMethods

Defined in:
lib/sweet/base.rb

Instance Method Summary collapse

Instance Method Details

#alias_property(aliases = {}) ⇒ Object



151
152
153
154
155
156
# File 'lib/sweet/base.rb', line 151

def alias_property(aliases = {})
  aliases.each do |from, to|
    alias_method from, to unless respond_to? to
    alias_method "#{from}=", "#{to}=" unless respond_to? "#{to}="
  end
end