Class: R2OAS::Hooks::GlobalHook
- Inherits:
-
Object
- Object
- R2OAS::Hooks::GlobalHook
- Defined in:
- lib/r2-oas/hooks/global_hook.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
Returns the value of attribute callback.
-
#once ⇒ Object
Returns the value of attribute once.
-
#target ⇒ Object
Returns the value of attribute target.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
- #call(*data) ⇒ Object
-
#initialize(callback, once, uid, target) ⇒ GlobalHook
constructor
A new instance of GlobalHook.
Constructor Details
#initialize(callback, once, uid, target) ⇒ GlobalHook
Returns a new instance of GlobalHook.
8 9 10 11 12 13 |
# File 'lib/r2-oas/hooks/global_hook.rb', line 8 def initialize(callback, once, uid, target) self.callback = callback self.once = once self.uid = uid self.target = target end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
6 7 8 |
# File 'lib/r2-oas/hooks/global_hook.rb', line 6 def callback @callback end |
#once ⇒ Object
Returns the value of attribute once.
6 7 8 |
# File 'lib/r2-oas/hooks/global_hook.rb', line 6 def once @once end |
#target ⇒ Object
Returns the value of attribute target.
6 7 8 |
# File 'lib/r2-oas/hooks/global_hook.rb', line 6 def target @target end |
#uid ⇒ Object
Returns the value of attribute uid.
6 7 8 |
# File 'lib/r2-oas/hooks/global_hook.rb', line 6 def uid @uid end |
Instance Method Details
#call(*data) ⇒ Object
15 16 17 |
# File 'lib/r2-oas/hooks/global_hook.rb', line 15 def call(*data) callback.call(*data) end |