2013-02-05 14:16:51 -05:00
|
|
|
class TopicPoster < OpenStruct
|
|
|
|
include ActiveModel::Serialization
|
|
|
|
|
|
|
|
attr_accessor :user, :description, :extras, :id
|
|
|
|
|
|
|
|
def attributes
|
2013-03-23 09:39:01 -04:00
|
|
|
{
|
|
|
|
'user' => user,
|
|
|
|
'description' => description,
|
|
|
|
'extras' => extras,
|
|
|
|
'id' => id
|
|
|
|
}
|
2013-02-05 14:16:51 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
# TODO: Remove when old list is removed
|
|
|
|
def [](attr)
|
|
|
|
send(attr)
|
|
|
|
end
|
|
|
|
end
|