Class: HmxClient::Command::Get

Inherits:
Base
  • Object
show all
Defined in:
lib/hmx/command/get.rb

Overview

Get full document from hmx

Constant Summary

Constants inherited from Base

Base::FILE

Instance Attribute Summary

Attributes inherited from Base

#args, #options

Instance Method Summary collapse

Methods inherited from Base

#hmx, #initialize, #loadConfig!, namespace, #removeConfig, #storeConfig, #writeConfig

Methods included from Helpers

#display, #display_row, #display_tab, #display_table, #error, #getFromUser, #longest

Constructor Details

This class inherits a constructor from HmxClient::Command::Base

Instance Method Details

#indexObject

get

get a document from hmx, given its display name



13
14
15
16
17
18
# File 'lib/hmx/command/get.rb', line 13

def index
  unless args.size > 0
    raise CommandFailed, "Usage: hmx get displayname" 
  end
  dout JSON.pretty_generate(hmx.doGetData(args))  
end