Exception: Gitomator::Exception::UnsupportedProviderMethod
- Inherits:
-
StandardError
- Object
- StandardError
- Gitomator::Exception::UnsupportedProviderMethod
- Defined in:
- lib/gitomator/exceptions.rb
Overview
This error will be thrown when a valid service method is called, but the underlying provider does not implement the given method.
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(provider, method) ⇒ UnsupportedProviderMethod
constructor
A new instance of UnsupportedProviderMethod.
Constructor Details
#initialize(provider, method) ⇒ UnsupportedProviderMethod
Returns a new instance of UnsupportedProviderMethod.
11 12 13 14 15 16 17 |
# File 'lib/gitomator/exceptions.rb', line 11 def initialize(provider, method) @provider = provider @method = method provider_name = provider.respond_to?(:name) ? provider.name : 'Unknown' super("#{provider_name} provider does not support the #{method} method.") end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'lib/gitomator/exceptions.rb', line 9 def method @method end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
9 10 11 |
# File 'lib/gitomator/exceptions.rb', line 9 def provider @provider end |