Sha256: 97ad0416cf11ab1e4df6c267cd6ef07e3bc65dcdc0b14fb5fef45feed74e7c6e
Contents?: true
Size: 679 Bytes
Versions: 4
Compression:
Stored size: 679 Bytes
Contents
module HylaFAX class Command DEFAULT_HOST = '127.0.0.1' DEFAULT_PORT = 4559 DEFAULT_USER = 'anonymous' DEFAULT_PASSWORD = 'anonymous' attr_reader :ftp, :host, :port, :user, :password def initialize(opts = {}) @ftp = opts.fetch(:ftp) { Net::FTP.new } @host = opts.fetch(:host) { DEFAULT_HOST } @port = opts.fetch(:port) { DEFAULT_PORT } @user = opts.fetch(:user) { DEFAULT_USER } @password = opts.fetch(:password) { DEFAULT_PASSWORD } end private def connect ftp.connect(host, port) end def login ftp.login(user, password) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hylafax-0.3.1 | lib/hylafax/command.rb |
hylafax-0.3.0 | lib/hylafax/command.rb |
hylafax-0.2.1 | lib/hylafax/command.rb |
hylafax-0.2.0 | lib/hylafax/command.rb |