Class: Automux::Core::Hook
- Inherits:
-
Object
- Object
- Automux::Core::Hook
- Defined in:
- lib/automux/core/hook.rb
Constant Summary collapse
- PRE =
2
- POST =
4
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#initialize(target, type, command) ⇒ Hook
constructor
A new instance of Hook.
- #post? ⇒ Boolean
- #pre? ⇒ Boolean
Constructor Details
#initialize(target, type, command) ⇒ Hook
Returns a new instance of Hook.
12 13 14 15 |
# File 'lib/automux/core/hook.rb', line 12 def initialize(target, type, command) @type = self.class.const_get(type.upcase) @command = ERB.new(command).result(target.get_binding) end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
9 10 11 |
# File 'lib/automux/core/hook.rb', line 9 def command @command end |