Sha256: 316ba74a4e6708c63e06f160f6729defd594c10367d0755752424ede04e96f0e

Contents?: true

Size: 398 Bytes

Versions: 1

Compression:

Stored size: 398 Bytes

Contents

class CouchConsole
  def init
    puts "** initialize uri"
    @commands << {
      :regexp => /^\s*uri\s*(.*)\s*$/,
      :method => :uri,
      :documentation => [["uri id", "Returns the CouchDB uri for the document"]]
    }
  end
  
  def uri( id )
    document = @db.get( id )
    puts document.uri
  rescue RestClient::ResourceNotFound
    puts "!!! Document `#{id}' does not exist."
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
couchc-0.1.0 lib/commands/uri.rb