Sha256: 375044dbce86e268015f4ac7118f6181c3e3ba933441b793eca2a8749d1ce12b
Contents?: true
Size: 311 Bytes
Versions: 1
Compression:
Stored size: 311 Bytes
Contents
module ActsAsVotable::Alias def self.words_to_alias object, words, call_function words.each do |word| if word.is_a?(String) function = word.to_sym if !object.respond_to?(function) object.send(:alias_method, function, call_function) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_votable-0.1.0 | lib/acts_as_votable/alias.rb |