Class: TM::ProviderHandler
- Inherits:
-
Object
- Object
- TM::ProviderHandler
- Defined in:
- lib/tm/provider_handler.rb
Instance Attribute Summary collapse
-
#taskmapper ⇒ Object
readonly
Returns the value of attribute taskmapper.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(taskmapper) ⇒ ProviderHandler
constructor
A new instance of ProviderHandler.
Constructor Details
#initialize(taskmapper) ⇒ ProviderHandler
Returns a new instance of ProviderHandler.
22 23 24 |
# File 'lib/tm/provider_handler.rb', line 22 def initialize(taskmapper) @taskmapper = taskmapper end |
Instance Attribute Details
#taskmapper ⇒ Object (readonly)
Returns the value of attribute taskmapper.
20 21 22 |
# File 'lib/tm/provider_handler.rb', line 20 def taskmapper @taskmapper end |
Class Method Details
.build_handler(provider, authentication) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/tm/provider_handler.rb', line 26 def self.build_handler(provider, authentication) self.new(TaskMapper.new(provider.to_sym, authentication.extend(TM::StringExtensions).to_hash)) rescue NameError raise TM::InvalidProvider, "Provider doesn't exists" end |