/
base.rb
21 lines (20 loc) · 998 Bytes
/
base.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Twitter
# @deprecated {Twitter::Base} is deprecated and will be permanently removed in the next major version. Please use {Twitter::Client} instead.
class Base
# Alias for Twitter::Client.new
#
# @deprecated {Twitter::Base} is deprecated and will be permanently removed in the next major version. Please use {Twitter::Client} 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