Add auto tagger for posts
This commit is contained in:
13
app/entities/auto_tagging.rb
Normal file
13
app/entities/auto_tagging.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Adamantium
|
||||
module Entities
|
||||
class AutoTagging < Dry::Struct
|
||||
attribute? :title_contains, Types::Optional::String
|
||||
attribute? :body_contains, Types::Optional::String
|
||||
attribute :tag_id, Types::Coercible::Integer
|
||||
|
||||
def title_only?
|
||||
!title_contains.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user