class Telegraph::Parser::Formats::Format

Attributes

content[R]

Public Class Methods

find(article_id, options={}) click to toggle source
# File lib/telegraph/parser/formats/format.rb, line 7
def self.find(article_id, options={})
  article = Telegraph::Parser::Article.find(article_id)
  new(article, options)
end
new(article, options = {}) click to toggle source
# File lib/telegraph/parser/formats/format.rb, line 12
def initialize(article, options = {})
  @article = article
  @options = options
  @content = ""
end

Public Instance Methods

process!() click to toggle source
# File lib/telegraph/parser/formats/format.rb, line 18
def process!
  raise 'Not implemented yet'
end
save(destination) click to toggle source
# File lib/telegraph/parser/formats/format.rb, line 22
def save(destination)
  FileUtils.mkdir_p(destination)

  File.open("#{destination}/#{filename}", "w") do |f|
    f.write(@content)
  end
end

Protected Instance Methods

filename() click to toggle source
# File lib/telegraph/parser/formats/format.rb, line 32
def filename
  raise 'Not implemented yet'
end