class EasyDownloader::Options
Attributes
files[RW]
host[RW]
load_count[RW]
local_file[RW]
local_path[RW]
local_pattern[RW]
password[RW]
remote_file[RW]
remote_path[RW]
remote_pattern[RW]
result[RW]
successful[RW]
type[RW]
user[RW]
Public Class Methods
new(*options)
click to toggle source
# File lib/easy_downloader/options.rb, line 10 def initialize(*options) @files = [] @successful = false @result = Result.new @load_count = 0 @options = options options.extract_options!.each do |key, value| send("#{key}=".to_sym, value) if respond_to?("#{key}=".to_sym) end end
Public Instance Methods
to_dir_path(path)
click to toggle source
# File lib/easy_downloader/options.rb, line 30 def to_dir_path(path) if path path =~ /\/$/ ? path : path + '/' else '' end end