2019-05-02 17:17:27 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-02-05 13:16:51 -06:00
|
|
|
class TopicPoster < OpenStruct
|
|
|
|
include ActiveModel::Serialization
|
|
|
|
|
2017-02-17 16:54:43 -06:00
|
|
|
attr_accessor :user, :description, :extras, :id, :primary_group
|
2013-02-05 13:16:51 -06:00
|
|
|
|
|
|
|
def attributes
|
2013-03-23 08:39:01 -05:00
|
|
|
{
|
|
|
|
'user' => user,
|
|
|
|
'description' => description,
|
|
|
|
'extras' => extras,
|
2017-02-17 16:54:43 -06:00
|
|
|
'id' => id,
|
|
|
|
'primary_group' => primary_group
|
2013-03-23 08:39:01 -05:00
|
|
|
}
|
2013-02-05 13:16:51 -06:00
|
|
|
end
|
|
|
|
|
|
|
|
# TODO: Remove when old list is removed
|
|
|
|
def [](attr)
|
2019-05-06 20:57:55 -05:00
|
|
|
public_send(attr)
|
2013-02-05 13:16:51 -06:00
|
|
|
end
|
|
|
|
end
|