Parent

Methods

Syckle::Shell

Shell is a subclass of Path::Shell (see rubyworks/path project). It extends the Path::Shell with commands generally associated with working with Ruby projects and other Ruby-oriented shell activies.

Wherever possible a command should call on the underlying tool programmatically rather than shelling out.

Public Instance Methods

email(options) click to toggle source

Email function to easily send out an email.

Settings:

subject      Subject of email message.
from         Message FROM address [email].
to           Email address to send announcemnt.
server       Email server to route message.
port         Email server's port.
domain       Email server's domain name.
account      Email account name if needed.
password     Password for login..
login        Login type: plain, cram_md5 or login [plain].
secure       Uses TLS security, true or false? [false]
message      Mesage to send -or-
file         File that contains message.
# File lib/syckle/shell/email.rb, line 22
def email(options)
  options[:file] = localize(options[:file]) if options[:file]
  emailer = Emailer.new(options.rekey)
  success = emailer.email
  if Exception === success
    puts "Email failed: #{success.message}."
  else
    puts "Email sent successfully to #{success.join(';')}."
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.