about summary refs log blame commit diff
path: root/app/lib/ostatus/activity/general.rb
blob: 8a6aabc3372edb36b0d68bf12f47cd0c2a53b7b9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                             
                                                          
                
                                                





                   
                             
               
                              
                
                                 

       
# frozen_string_literal: true

class OStatus::Activity::General < OStatus::Activity::Base
  def specialize
    special_class&.new(@xml, @account, @options)
  end

  private

  def special_class
    case verb
    when :post
      OStatus::Activity::Post
    when :share
      OStatus::Activity::Share
    when :delete
      OStatus::Activity::Deletion
    end
  end
end