Module: DTK::Client::CommandBase

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.handle_argument_error(task, error) ⇒ Object



45
46
47
# File 'lib/commands.rb', line 45

def self.handle_argument_error(task, error)
  super
end

Instance Method Details

#get(url) ⇒ Object



26
27
28
# File 'lib/commands.rb', line 26

def get(url)
  get_connection.get(self.class,url)
end

#get_connectionObject



41
42
43
# File 'lib/commands.rb', line 41

def get_connection
  DTK::Client::Session.get_connection()
end

#post(url, body = nil) ⇒ Object



29
30
31
# File 'lib/commands.rb', line 29

def post(url,body=nil)
  get_connection.post(self.class,url,body)
end

#post_file(url, body = nil) ⇒ Object



33
34
35
# File 'lib/commands.rb', line 33

def post_file(url,body=nil)
  get_connection.post_file(self.class,url,body)
end

#rest_url(route) ⇒ Object



37
38
39
# File 'lib/commands.rb', line 37

def rest_url(route)
  get_connection.rest_url(route)
end

#rotate_args(rotated_args) ⇒ Object

TODO: temp workaround



22
23
24
# File 'lib/commands.rb', line 22

def rotate_args(rotated_args)
  [rotated_args.last] + rotated_args[0..rotated_args.size-2]
end