Module: Graft::HookPoint::Chain
- Defined in:
- lib/graft/hook_point.rb
Instance Method Summary collapse
- #disable(key) ⇒ Object
- #disabled?(key) ⇒ Boolean
- #enable(key) ⇒ Object
- #install(key, &block) ⇒ Object
- #installed?(key) ⇒ Boolean
- #uninstall(key) ⇒ Object
Instance Method Details
#disable(key) ⇒ Object
274 275 276 |
# File 'lib/graft/hook_point.rb', line 274 def disable(key) unchain(key) end |
#disabled?(key) ⇒ Boolean
278 279 280 |
# File 'lib/graft/hook_point.rb', line 278 def disabled?(key) !chained?(key) end |
#enable(key) ⇒ Object
270 271 272 |
# File 'lib/graft/hook_point.rb', line 270 def enable(key) chain(key) end |
#install(key, &block) ⇒ Object
260 261 262 263 |
# File 'lib/graft/hook_point.rb', line 260 def install(key, &block) define(key, &block) chain(key) end |
#installed?(key) ⇒ Boolean
256 257 258 |
# File 'lib/graft/hook_point.rb', line 256 def installed?(key) defined(key) end |
#uninstall(key) ⇒ Object
265 266 267 268 |
# File 'lib/graft/hook_point.rb', line 265 def uninstall(key) disable(key) remove(key) end |