Class: DK::Post
- Inherits:
-
Object
- Object
- DK::Post
- Defined in:
- lib/autofixer/patches/DK_Post.rb
Instance Method Summary collapse
-
#has_info? ⇒ Boolean
Post has a summary or tags?.
- #has_summary? ⇒ Boolean
-
#has_trail? ⇒ Boolean
Do we know where it was reblogged from?.
-
#processed?(skip: false, prefix: '') ⇒ Boolean
Post already has prefix?.
Instance Method Details
#has_info? ⇒ Boolean
Post has a summary or tags?
4 5 6 |
# File 'lib/autofixer/patches/DK_Post.rb', line 4 def has_info? has_summary? || !.empty? end |
#has_summary? ⇒ Boolean
21 22 23 |
# File 'lib/autofixer/patches/DK_Post.rb', line 21 def has_summary? summary.strip.empty? end |
#has_trail? ⇒ Boolean
Do we know where it was reblogged from?
9 10 11 |
# File 'lib/autofixer/patches/DK_Post.rb', line 9 def has_trail? !trail.empty? end |
#processed?(skip: false, prefix: '') ⇒ Boolean
Post already has prefix?
14 15 16 17 18 19 |
# File 'lib/autofixer/patches/DK_Post.rb', line 14 def processed?(skip: false, prefix: '') return false if skip return false if prefix.empty? l_comment = Sanitize.fragment(comment).strip l_comment.start_with?(prefix) || summary.strip.start_with?(prefix) end |