mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 12:03:35 +08:00
20 lines
339 B
Ruby
20 lines
339 B
Ruby
class TopicPoster < OpenStruct
|
|
include ActiveModel::Serialization
|
|
|
|
attr_accessor :user, :description, :extras, :id
|
|
|
|
def attributes
|
|
{
|
|
'user' => user,
|
|
'description' => description,
|
|
'extras' => extras,
|
|
'id' => id
|
|
}
|
|
end
|
|
|
|
# TODO: Remove when old list is removed
|
|
def [](attr)
|
|
send(attr)
|
|
end
|
|
end
|