Sha256: bf78bb56b9243fd6f81165d4738d5cfc91cdd026ea9d43d976048f38a6ffa7ec

Contents?: true

Size: 267 Bytes

Versions: 7

Compression:

Stored size: 267 Bytes

Contents

require 'net/http'

module Pears
  module Provider
    # Fetch a yaml file via HTTP
    class RemoteFile < LocalFile
      def initialize(remote_url)
        yaml_data = Net::HTTP.get(URI(remote_url))
        @data = parse_yaml(yaml_data)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pears-0.0.7 lib/pears/provider/remote_file.rb
pears-0.0.6 lib/pears/provider/remote_file.rb
pears-0.0.5 lib/pears/provider/remote_file.rb
pears-0.0.4 lib/pears/provider/remote_file.rb
pears-0.0.3 lib/pears/provider/remote_file.rb
pears-0.0.2 lib/pears/provider/remote_file.rb
pears-0.0.1 lib/pears/provider/remote_file.rb