You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: poipiku.rb
    path of file: ./repos/danbooru/app/logical/source/url
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Source::URL::Poipiku < Source::URL
  attr_reader :user_id, :post_id, :image_dir, :image_id, :image_hash, :original_file_ext

  def self.match?(url)
    url.domain == "poipiku.com"
  end

  def parse
    case [subdomain, domain, *path_segments]

    # https://img.poipiku.com/user_img02/006849873/008271386_016865825_S968sAh7Y.jpeg_640.jpg (sample)
    # https://img-org.poipiku.com/user_img02/006849873/008271386_016865825_S968sAh7Y.jpeg (original)
    # https:
    
  def parse
    case [subdomain, domain, *path_segments]

    # https://img.poipiku.com/user_img02/006849873/008271386_016865825_S968sAh7Y.jpeg_640.jpg (sample)
    # https://img-org.poipiku.com/user_img02/006849873/008271386_016865825_S968sAh7Y.jpeg (original)
    # https://poipiku.com/6849873/8271386.html (page URL)
    in ("img" | "img-org"), "poipiku.com", image_dir, user_id, /^(\d+)_(\d+)_(\w+)\.([a-z]+)/
      @image_dir = image_dir
      @user_id = user_id.to_i
      @post_id = $1.to_i
      @image_id = $2.to_i
      @image_hash = $3
      @original_file_ext = $4

    # https://img.poipiku.com/user_img03/000020566/007185704_nb1cTuA1I.jpeg_640.jpg (sample)
    # https://img-org.poipiku.com/user_img03/000020566/007185704_nb1cTuA1I.jpeg (original)
    # https://poipiku.com/20566/7204115.html (actual page URL; https://poipiku.com/20566/007185704.html redirects to this)
    in ("img" | "img-org"), "poipiku.com", image_dir, user_id, /^(\d+)_(\w+)\.([a-z]+)/
      @image_dir = image_dir
      @user_id = user_id.to_i
      @post_id = $1.to_i
      @image_hash = $2
      @original_file_ext = $3

    # https://img.poipiku.com/user_img02/000003310/000007036.jpeg_640.jpg (sample)
    # https://img-org.poipiku.com/user_img02/000003310/000007036.jpeg (original)
    # https://poipiku.com/3310/7036.html (page URL)
    in ("img" | "img-org"), "poipiku.com", image_dir, user_id, /^(\d+)\.([a-z]+)/
      @image_dir = image_dir
      @user_id = user_id.to_i
      @post_id = $1.to_i
      @original_file_ext = $2

    # https://poipiku.com/6849873/8271386.html
    in _, "poipiku.com", user_id, /(\d+)\.html$/i
      @user_id = user_id
      @post_id = $1.to_i

    # https://poipiku.com/IllustListPcV.jsp?ID=9056
    # https://poipiku.com/IllustListGridPcV.jsp?ID=9056
    in _, "poipiku.com", ("IllustListPcV.jsp" | "IllustListGridPcV.jsp" | "ActivityListPcV.jsp") if params[:ID].present?
      @user_id = params[:ID]

    # https://poipiku.com/6849873
    in _, "poipiku.com", /^\d+$/ => user_id
      @user_id = user_id

    else
      nil
    end
  end