Sha256: 8d80cd8450889757f2e49c21353aad4ccaab036852fbe294b2f39369af9e342f

Contents?: true

Size: 761 Bytes

Versions: 1

Compression:

Stored size: 761 Bytes

Contents

# Copyright: Copyright (c) 2005  Nicolas Pouillard. All rights reserved.
# Author: Nicolas Pouillard  <ertai@lrde.epita.fr>.
# License: Gnu General Public License.

# $LastChangedBy: ertai $
# $Id: uri_ex.rb 201 2005-04-23 00:31:12Z ertai $

require 'uri'

module URI

  class CheckoutError < Exception
  end

  class CommitError < Exception
  end

  class SaveError < Exception
  end

  class Generic

    def pathname
      Pathname.new(path)
    end

    def to_yaml_type
      '!uri'
    end     

    def to_yaml ( opts={} )
      "!uri #{to_s}"
    end

    def checkout
      raise CheckoutError, "Can't checkout a #{self.class}"
    end

    def save
      raise SaveError, "Can't save a #{self.class}"
    end

  end # module Generic

end # module URI

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vcs-0.2.148 ruby_ex/uri_ex.rb