Class: RatProto::Commands::Fetch

Inherits:
Base
  • Object
show all
Defined in:
lib/ratproto/commands/fetch.rb

Constant Summary

Constants inherited from Base

Base::DID_REGEXP, Base::HANDLE_REGEXP, Base::NSID_REGEXP

Instance Method Summary collapse

Instance Method Details

#executeObject



15
16
17
18
19
20
21
# File 'lib/ratproto/commands/fetch.rb', line 15

def execute
  require 'minisky'

  repo, collection, rkey = parse_at_uri(uri)
  response = load_record(repo, collection, rkey)
  puts JSON.pretty_generate(response['value'])
end