/
base.rb
20 lines (19 loc) · 864 Bytes
/
base.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Twitter
class Base
# Alias for Twitter::Client.new
#
# @deprecated {Twitter::Base#client} is deprecated and will be permanently removed in the next major version. Please use Twitter::Client.new instead.
# @return [Twitter::Client]
def client(options={})
Twitter::Client.new(options)
end
# Delegate to Twitter::Client
#
# @deprecated {Twitter::Base} is deprecated and will be permanently removed in the next major version. Please use {Twitter::Client} instead.
def method_missing(method, *args, &block)
return super unless client.respond_to?(method)
warn "#{Kernel.caller.first}: [DEPRECATION] Twitter::Base##{method} is deprecated and will be permanently removed in the next major version. Please use Twitter::Client##{method} instead."
client.send(method, *args, &block)
end
end
end