Class: Transpec::Syntax::Hook
- Inherits:
-
Syntax
- Object
- Syntax
- Transpec::Syntax::Hook
- Includes:
- RSpecDSL, Mixin::Send
- Defined in:
- lib/transpec/syntax/hook.rb
Constant Summary collapse
- SCOPE_ALIASES =
{ each: :example, all: :context }
Constants included from RSpecDSL
RSpecDSL::EXAMPLE_GROUP_METHODS, RSpecDSL::EXAMPLE_METHODS, RSpecDSL::HELPER_METHODS, RSpecDSL::HOOK_METHODS
Instance Method Summary collapse
Methods included from Mixin::Send
#arg_node, #arg_nodes, #arg_range, #args_range, #method_name, #parentheses_range, #range_after_arg, #range_in_between_receiver_and_selector, #range_in_between_selector_and_arg, #receiver_node, #receiver_range, #selector_range
Methods included from Mixin::Send::TargetDetection
Instance Method Details
#convert_scope_name! ⇒ Object
21 22 23 24 25 |
# File 'lib/transpec/syntax/hook.rb', line 21 def convert_scope_name! return if !scope_name || !replacement_scope_name replace(arg_range, replacement_scope_name.inspect) add_record end |
#dynamic_analysis_target? ⇒ Boolean
17 18 19 |
# File 'lib/transpec/syntax/hook.rb', line 17 def dynamic_analysis_target? super && HOOK_METHODS.include?(method_name) end |