Sha256: 9f6d924a3b3d68e21bfee1d3bcdca62afd9f23ac85b8ce41adf94341f0ea513c

Contents?: true

Size: 402 Bytes

Versions: 1

Compression:

Stored size: 402 Bytes

Contents

class MovieStone::Output::Mail < MovieStone::Output::Base
  attr_reader :from_addr, :to_addr, :body, :subject

  private
  def initialize_fields
    @subject = @movie.title
    if @movie.rating.present? && @movie.rating != "N/A"
      @subject += " [#{@movie.rating}]"
    end
    @body    = rendered
  end

  def publish
    MovieStone::Mailer.new.deliver(from_addr, to_addr, body, subject)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
movie_stone-0.1.0 lib/movie_stone/output/mail.rb