lib/chronicle/etl/authorizer.rb in chronicle-etl-0.5.5 vs lib/chronicle/etl/authorizer.rb in chronicle-etl-0.6.1
- old
+ new
@@ -5,27 +5,26 @@
class << self
attr_reader :provider_name
# Macro for setting provider on an Authorizer
def provider(provider_name)
- @provider_name = provider_name
+ @provider_name = provider_name.to_sym
end
# From all loaded Authorizers, return the first one that matches
# a given provider
#
# @todo Have a proper identifier system for authorizers
# (to have more than one per plugin)
def find_by_provider(provider)
- ObjectSpace.each_object(::Class).select {|klass| klass < self }.find do |authorizer|
+ ObjectSpace.each_object(::Class).select { |klass| klass < self }.find do |authorizer|
authorizer.provider_name == provider
end
end
end
# Construct a new authorizer
- def initialize(args)
- end
+ def initialize(args); end
# Main entry-point for authorization flows. Implemented by subclass
def authorize!
raise NotImplementedError
end