This commit is contained in:
2026-03-27 01:01:47 +09:00
parent e8be071064
commit e40f7a3620
4 changed files with 212 additions and 23 deletions
@@ -0,0 +1,16 @@
# frozen_string_literal: true
module WikiAssetRepr
BASE = { only: [:wiki_page_id, :no], methods: [:url] }.freeze
module_function
def base wiki_asset
wiki_asset.as_json(BASE)
end
def many wiki_assets
wiki_assets.map { |a| base(a) }
end
end