Class: Hooks::HookSet

Inherits:
Hash
  • Object
show all
Defined in:
lib/hooks.rb

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object


120
121
122
# File 'lib/hooks.rb', line 120

def [](name)
  super(name.to_sym)
end

#[]=(name, values) ⇒ Object


124
125
126
# File 'lib/hooks.rb', line 124

def []=(name, values)
  super(name.to_sym, values)
end

#cloneObject


128
129
130
131
132
# File 'lib/hooks.rb', line 128

def clone
  super.tap do |cloned|
    each { |name, callbacks| cloned[name] = callbacks.clone }
  end
end