Class: Kerio::Api::Method::Upload

Inherits:
Generic
  • Object
show all
Defined in:
lib/kerio-api/method/upload.rb

Instance Method Summary collapse

Methods inherited from Generic

#[], #__result, #initialize, #method_missing, #pretty_print

Methods included from ChainableMethod

#next_method

Constructor Details

This class inherits a constructor from Kerio::Api::Method::Generic

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Kerio::Api::Method::Generic

Instance Method Details

#__invoke_methodObject



8
9
10
11
12
13
14
# File 'lib/kerio-api/method/upload.rb', line 8

def __invoke_method
  if @resp.nil?
    raw = @session.upload_file(File.new(@args[0]))

    @resp = JSON.parse(raw)
  end
end