Sha256: ba6acbe8c4e92faf4365d195a5f15fb21046fd9803d4d3f49027a110fe62f15c
Contents?: true
Size: 666 Bytes
Versions: 7
Compression:
Stored size: 666 Bytes
Contents
# frozen_string_literal: true module Fushin class Item attr_reader :title, :link def initialize(title:, link:) @title = title @link = link end def post @post ||= [].tap do |out| case link when /jugem\.jp/ out << Posts::Jugem.new(link) when /kikey\.net/ out << Posts::Kikey.new(link) when /seesaa\.net/ out << Posts::Seesaa.new(link) when /shinobi\.jp/ out << Posts::Shinobi.new(link) when /teacup\.com/ out << Posts::Teacup.new(link) else raise NoMachingPostsError end end.first end end end
Version data entries
7 entries across 7 versions & 1 rubygems