20 行
293 B
Ruby
20 行
293 B
Ruby
# frozen_string_literal: true
|
|
|
|
|
|
module PostCompactRepr
|
|
module_function
|
|
|
|
def base post
|
|
return nil if post.nil?
|
|
|
|
PostRepr
|
|
.common(post)
|
|
.slice(
|
|
'id',
|
|
'title',
|
|
'url',
|
|
'thumbnail',
|
|
'thumbnail_base')
|
|
end
|
|
end
|