Sha256: ecf2bba0f328f26faeb996146ebf80638bc7aa52a251592825be64ee7f3d823c
Contents?: true
Size: 494 Bytes
Versions: 12
Compression:
Stored size: 494 Bytes
Contents
class WhowishWordFacebook include Mongoid::Document field :publish_id,:type=>String field :message, :type=>String field :name, :type=>String field :caption, :type=>String field :description, :type=>String key :publish_id def word_for(field,*p) content = self[field].to_s if p.length > 0 p = p[0] p.each_pair { |key,val| content.gsub!("{"+key.to_s+"}",val.to_s) } end content end end
Version data entries
12 entries across 12 versions & 1 rubygems