module BitBucket
TODO: Set token required calls
Constants
- DEPRECATION_PREFIX
Attributes
api_client[RW]
Handle for the client instance
deprecation_tracker[W]
Public Class Methods
deprecate(method, alternate_method = nil)
click to toggle source
Displays deprecation message to the user. Each message is printed once.
# File lib/bitbucket_rest_api/deprecation.rb, line 14 def deprecate(method, alternate_method = nil) return if deprecation_tracker.include? method deprecation_tracker << method message = <<~NOTICE #{DEPRECATION_PREFIX} * #{method} is deprecated. NOTICE if alternate_method message << <<~ADDITIONAL * please use #{alternate_method} instead. ADDITIONAL end warn_deprecation(message) end
deprecation_tracker()
click to toggle source
# File lib/bitbucket_rest_api/deprecation.rb, line 8 def deprecation_tracker @deprecation_tracker ||= [] end
method_missing(method, *args, &block)
click to toggle source
Delegate to BitBucket::Client
Calls superclass method
# File lib/bitbucket_rest_api.rb, line 25 def method_missing(method, *args, &block) return super unless new.respond_to?(method) new.send(method, *args, &block) end
new(options = {}, &block)
click to toggle source
Alias for BitBucket::Client.new
@return [BitBucket::Client]
# File lib/bitbucket_rest_api.rb, line 19 def new(options = {}, &block) @api_client = BitBucket::Client.new(options, &block) end
respond_to?(method, include_private = false)
click to toggle source
Calls superclass method
# File lib/bitbucket_rest_api.rb, line 31 def respond_to?(method, include_private = false) new.respond_to?(method, include_private) || super(method, include_private) end
warn_deprecation(message)
click to toggle source
# File lib/bitbucket_rest_api/deprecation.rb, line 32 def warn_deprecation(message) send :warn, message end