Method: Atom::Tools#write_output
- Defined in:
- lib/atom/tools.rb
#write_output(entries, dest, options) ⇒ Object
turns an Array of Atom::Entrys into a collection of Atom Entries
entries: an Array of Atom::Entrys pairs dest: a URL, a directory or “-” for an Atom Feed on stdout options:
:user - username to use for HTTP requests (if required)
:pass - password to use for HTTP requests (if required)
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/atom/tools.rb', line 105 def write_output entries, dest, if dest.match /^http/ http = Atom::HTTP.new setup_http http, entries_to_http entries, dest, http elsif dest == '-' entries_to_stdout entries else entries_to_dir entries, dest end end |