Class: GitHooks::Utils::Config::HookWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/git_hooks/utils/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ HookWrapper

Returns a new instance of HookWrapper.



12
13
14
15
# File 'lib/git_hooks/utils/config.rb', line 12

def initialize(options)
  @hook_class_name = options.keys.first
  @options = options.values.first
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/git_hooks/utils/config.rb', line 10

def options
  @options
end

Instance Method Details

#hook_classObject



17
18
19
# File 'lib/git_hooks/utils/config.rb', line 17

def hook_class
  @hook_class ||= "GitHooks::Notifier::#{@hook_class_name.to_s.camelize}Client".constantize
end