Sha256: f87d48b342314eb5cea8305203037ad15b14bf14f84d62623cd871426ed39f64
Contents?: true
Size: 564 Bytes
Versions: 9
Compression:
Stored size: 564 Bytes
Contents
Net::SMTP=Class.new class Net::SMTP # don't *really* send messages--this is just a stub def initialize(hostname, port) @@hostname=hostname @@port=port end def self.start(hostname, port, localhostname="localhost") @started=true yield(self.new(hostname,port)) if block_given? end def send_message(message, from, to) @@from=from @@to=to @@message=message end %w{from to message hostname port}.each do |attrib| instance_eval "def #{attrib}; @@#{attrib} end" end end
Version data entries
9 entries across 9 versions & 1 rubygems