Class URI::Generic
In: lib/uri/generic_ex.rb
Parent: Object

Methods

Public Class methods

[Source]

# File lib/uri/generic_ex.rb, line 95
    def self.yaml_load ( val )
      URI.parse(val)
    end

Public Instance methods

[Source]

# File lib/uri/generic_ex.rb, line 70
    def add_query ( arg )
      if query.nil?
        self.query = arg
      else
        self.query += ',' + arg
      end
    end

[Source]

# File lib/uri/generic_ex.rb, line 58
    def checkout
      raise CheckoutError, "Can't checkout a #{self.class}"
    end

[Source]

# File lib/uri/generic_ex.rb, line 62
    def commit ( *args )
      raise CommitError, "Can't commit a #{self.class}"
    end

[Source]

# File lib/uri/generic_ex.rb, line 79
    def mk_custom_opts
      opts = []
      return opts if @query.nil?
      @query.split(/,/).map do |x|
        k, v = x.split(/=/)
        k = URI.decode(k)
        if k.size == 1
          opts << "-#{k}"
        else
          opts << "--#{k}"
        end
        opts << URI.decode(v) unless v.nil?
      end
      opts
    end

[Source]

# File lib/uri/generic_ex.rb, line 41
    def pathname
      Pathname.new(path)
    end

[Source]

# File lib/uri/generic_ex.rb, line 45
    def pathname= ( path )
      self.path = path.to_s
    end

[Source]

# File lib/uri/generic_ex.rb, line 66
    def save
      raise SaveError, "Can't save a #{self.class}"
    end

[Source]

# File lib/uri/generic_ex.rb, line 53
    def to_uri
      self
    end
to_url()

Alias for to_uri

[Source]

# File lib/uri/generic_ex.rb, line 49
    def to_yaml_string
      to_s
    end

[Validate]