Class: Prest::Service

Inherits:
BasicObject
Defined in:
lib/prest/service.rb

Overview

Base Service Object from which to extend to integrate with api’s using the Prest gem.

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, **kwargs) ⇒ Object



6
7
8
# File 'lib/prest/service.rb', line 6

def method_missing(method, *args, **kwargs)
  client.__send__(method, *args, **kwargs)
end

Class Method Details

.method_missing(method, *args, **kwargs) ⇒ Object



10
11
12
# File 'lib/prest/service.rb', line 10

def self.method_missing(method, *args, **kwargs)
  new.__send__(:client).__send__(method, *args, **kwargs)
end

.respond_to_missing?(_, _) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/prest/service.rb', line 14

def self.respond_to_missing?(_, _)
  true
end

Instance Method Details

#respond_to_missing?(_, _) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/prest/service.rb', line 18

def respond_to_missing?(_, _)
  true
end