Exception: Gitomator::Exception::UnsupportedProviderMethod

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

#methodObject (readonly)

Returns the value of attribute method.



9
10
11
# File 'lib/gitomator/exceptions.rb', line 9

def method
  @method
end

#providerObject (readonly)

Returns the value of attribute provider.



9
10
11
# File 'lib/gitomator/exceptions.rb', line 9

def provider
  @provider
end