Class: Wordmove::Hook::Config
- Inherits:
-
Struct
- Object
- Struct
- Wordmove::Hook::Config
- Defined in:
- lib/wordmove/hook.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#options ⇒ Object
Returns the value of attribute options.
-
#step ⇒ Object
Returns the value of attribute step.
Instance Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
36 37 38 |
# File 'lib/wordmove/hook.rb', line 36 def action @action end |
#options ⇒ Object
Returns the value of attribute options
36 37 38 |
# File 'lib/wordmove/hook.rb', line 36 def @options end |
#step ⇒ Object
Returns the value of attribute step
36 37 38 |
# File 'lib/wordmove/hook.rb', line 36 def step @step end |
Instance Method Details
#empty? ⇒ Boolean
37 38 39 |
# File 'lib/wordmove/hook.rb', line 37 def empty? (local_hooks + remote_hooks).empty? end |
#local_hooks ⇒ Object
41 42 43 44 45 46 |
# File 'lib/wordmove/hook.rb', line 41 def local_hooks return [] if empty_step? [action][step] .select { |hook| hook[:where] == 'local' } || [] end |
#remote_hooks ⇒ Object
48 49 50 51 52 53 |
# File 'lib/wordmove/hook.rb', line 48 def remote_hooks return [] if empty_step? [action][step] .select { |hook| hook[:where] == 'remote' } || [] end |