class DaFace::Datasift::Interaction
Attributes
content[R]
created_at[R]
id[R]
link[R]
received_at[R]
schema[R]
source[R]
tag_tree[R]
type[R]
Public Class Methods
new(data={})
click to toggle source
# File lib/da_face/datasift/interaction.rb, line 10 def initialize data={} allowed_attributes.each do |attr| unless data[attr].nil? self.instance_variable_set("@#{attr}".to_sym, data[attr]) end end normalize_attributes! return self end
Public Instance Methods
allowed_attributes()
click to toggle source
# File lib/da_face/datasift/interaction.rb, line 20 def allowed_attributes [:author, :content, :created_at, :id, :link, :received_at, :schema, :source, :type, :tags, :tag_tree] end
normalize_attributes!()
click to toggle source
# File lib/da_face/datasift/interaction.rb, line 26 def normalize_attributes! @created_at = parse_timestamp(@created_at) if @created_at @received_at = parse_timestamp(@received_at) if @received_at end