Sha256: 56fcdfea8cc19522c2bc94f3dd4e8474cf0408a5057b9eb3a9a603a6b329b8f0

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

class Chat < PostType
  fields :transcript
  required :transcript
  
  # override commit_pairs to make chat transcripts form the Me: pairs stuff
  def commit_array(pairs_array)
    transcript = []
    
    pairs_array.each do |pairs_hash|
      
      pairs_hash.each do |key, value|
        
        unless self.class.allowed_fields_list.include?(key)
          transcript << { key => value }
        else
          set_attr(key, value)
        end
      end#of each
      
    end#of each
    
    set_attr(:transcript, transcript)
    
  end#of commit_pairs
  
  def self.detect?(text)
    has_one_or_more? text, :me
  end
end#of Chat

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
myobie-turbine-core-0.1.0 lib/types/chat.rb
myobie-turbine-core-0.1.1 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.2.0 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.3.0 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.3.1 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.3.3 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.3.5 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.3.6 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.3.7 lib/turbine-core/types/chat.rb
myobie-turbine-core-0.4.0 lib/turbine-core/types/chat.rb