Class: Universign::Client

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/universign/client.rb

Defined Under Namespace

Classes: ErrorWhenSigningPDF, InvalidCredentials, UnknownException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



8
9
10
11
12
# File 'lib/universign/client.rb', line 8

def initialize
  @client          = XMLRPC::Client.new2(Universign.configuration.endpoint)
  @client.user     = Universign.configuration.
  @client.password = Universign.configuration.password
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/universign/client.rb', line 14

def method_missing(method, *args, &block)
  if @client.respond_to?(method)
    @client.send(method, *args, &block)
  else
    super(method, *args, &block)
  end
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/universign/client.rb', line 6

def client
  @client
end