discourse/app/models/topic_poster.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
433 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2013-02-05 14:16:51 -05:00
class TopicPoster < OpenStruct
include ActiveModel::Serialization
attr_accessor :user, :description, :extras, :id, :primary_group
2013-02-05 14:16:51 -05:00
def attributes
{
'user' => user,
'description' => description,
'extras' => extras,
'id' => id,
'primary_group' => primary_group
}
2013-02-05 14:16:51 -05:00
end
# TODO: Remove when old list is removed
def [](attr)
public_send(attr)
2013-02-05 14:16:51 -05:00
end
end