Module: SharedBehaviors::InstanceMethods

Defined in:
lib/daily/shared_behaviors.rb

Instance Method Summary collapse

Instance Method Details

#apply_transform(table) ⇒ Object



17
18
19
20
21
# File 'lib/daily/shared_behaviors.rb', line 17

def apply_transform(table)
  return table if transform.blank?
  t = transform.constantize.new(table, transform_data)
  t.result
end

#guid_generateObject



12
13
14
15
# File 'lib/daily/shared_behaviors.rb', line 12

def guid_generate
  key = "#{Time.now.to_i}::#{rand(999999999)}::#{attributes.values.join("::")}"
  Digest::MD5.hexdigest(key)
end