Class: Fushin::Posts::Sblo

Inherits:
Post
  • Object
show all
Defined in:
lib/fushin/posts/sblo.rb

Instance Attribute Summary

Attributes inherited from Post

#url

Instance Method Summary collapse

Methods inherited from Post

#btcs, #initialize, #links, #main, #urls, #urls_in_text

Constructor Details

This class inherits a constructor from Fushin::Posts::Post

Instance Method Details

#attachementsObject



14
15
16
17
18
19
20
21
22
# File 'lib/fushin/posts/sblo.rb', line 14

def attachements
  @attachements ||= doc.css("div.text > a").map do |a|
    url = a.get("href")
    next unless url
    next unless url.include? "/sblo_files/"

    Models::Attachment.new url
  end.compact
end

#main_cleanup_selectorsObject



10
11
12
# File 'lib/fushin/posts/sblo.rb', line 10

def main_cleanup_selectors
  %w(.posted)
end

#main_selectorObject



6
7
8
# File 'lib/fushin/posts/sblo.rb', line 6

def main_selector
  "div.WordSection1"
end