~srushe/ho-tan

a7dbf2b482e8198784d6cd3edbe4f113c7a631e4 — Stephen Rushe 2 years ago 4a2e3f7 + 4e7b517
Merge pull request #3 from srushe/add-like-support

Add Like support
3 files changed, 14 insertions(+), 1 deletions(-)

M lib/ho_tan/post.rb
A lib/ho_tan/post/type/like.rb
M spec/lib/ho_tan/post_spec.rb
M lib/ho_tan/post.rb => lib/ho_tan/post.rb +1 -0
@@ 5,6 5,7 @@ require_relative 'post/location'
require_relative 'post/type/article'
require_relative 'post/type/bookmark'
require_relative 'post/type/checkin'
require_relative 'post/type/like'
require_relative 'post/type/note'
require_relative 'post/type/photo'
require_relative 'post/type/read'

A lib/ho_tan/post/type/like.rb => lib/ho_tan/post/type/like.rb +12 -0
@@ 0,0 1,12 @@
# frozen_string_literal: true

require_relative 'base'

module HoTan
  class Post
    module Type
      class Like < Base
      end
    end
  end
end

M spec/lib/ho_tan/post_spec.rb => spec/lib/ho_tan/post_spec.rb +1 -1
@@ 104,7 104,7 @@ RSpec.describe HoTan::Post do
    }
  end
  let(:post_type_class) do
    %w[Article Bookmark Checkin Note Photo Read Reply Repost].sample
    %w[Article Bookmark Checkin Like Note Photo Read Reply Repost].sample
  end
  let(:post_type_full_class) do
    Object.const_get("HoTan::Post::Type::#{post_type_class}")