Class: Telegram::ClientAdapter::ApiProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/telegram/client_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(adapter) ⇒ ApiProxy

Returns a new instance of ApiProxy.



8
9
10
# File 'lib/telegram/client_adapter.rb', line 8

def initialize adapter
  @adapter = adapter
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(command, *args) ⇒ Object



12
13
14
15
16
# File 'lib/telegram/client_adapter.rb', line 12

def method_missing command, *args
  puts "call adapter with #{command}"
  p args
  @adapter.send_command command, *args
end