Read XML File helper determines from the parameter if it should read a file, URL or a plain string.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
MIT-LICENSE
README.md
gem-public_cert.pem
rxfhelper.gemspec

README.md

Introducing the rxfhelper gem

RXFHelper.read accepts a string containing a URL, a file location, or just a plain string and returns the contents of the location otherwise it just returns the string.

e.g.

require 'rxfhelper'

#location = 'http://jamesrobertson.eu/index.html'
location = '/home/james/index.html'
#location = '<html><head><title>index</title></head><body><p>test</p></body></html>'
RXFHelper.read(location)

rxfhelper gem location url reader