Sha256: 7edd7c8c0b0dc868c55f50911c40473b41403fe046ba2dda1ab90f9f534191e7
Contents?: true
Size: 321 Bytes
Versions: 2
Compression:
Stored size: 321 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.pluralize.to_sym if !object.respond_to?(function) object.send(:alias_method, function, call_function) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acts_as_votable-0.0.5 | lib/acts_as_votable/alias.rb |
acts_as_votable-0.0.4 | lib/acts_as_votable/alias.rb |