class Mexico::FileSystem::URL

An URL object stands for a resource representation at the given location.

Public Class Methods

new(opts={}) click to toggle source
# File lib/mexico/file_system/url.rb, line 45
def initialize(opts={})
  # @corpus = corpus
  [:identifier,:name,:description].each do |att|
    send("#{att}=", opts[att]) if opts.has_key?(att)
  end
end

Public Instance Methods

get(opts = {} ) click to toggle source

Attempts to fetch the contents at this resource. @option opts [String] :format The format to be retrieved. If omitted, the standard format will be retrieved. @return [String or ByteArray] The file contents, as a string or binary object.

# File lib/mexico/file_system/url.rb, line 61
def get(opts = {} )
  # @todo Implement this method stub
end
info() click to toggle source

Retrieves a bunch of meta data with information about this resource representation. @return [Hash] A hash containing various information (size, mime_type, availability)

# File lib/mexico/file_system/url.rb, line 54
def info
  # @todo Implement this method stub
end