Class: RubyNext::Language::Rewriters::EndlessMethodCommand

Inherits:
EndlessMethod show all
Defined in:
lib/ruby-next/language/rewriters/3.1/endless_method_command.rb

Constant Summary collapse

NAME =
"endless-method-command"
SYNTAX_PROBE =
"obj = Object.new; def obj.foo = puts 'Hello'"
MIN_SUPPORTED_VERSION =
Gem::Version.new("3.1.0")

Instance Attribute Summary

Attributes inherited from Base

#locals

Instance Method Summary collapse

Methods inherited from EndlessMethod

#on_def, #on_defs

Methods inherited from Base

ast?, #initialize, #s

Methods inherited from Abstract

ast?, #initialize, text?, transform, unsupported_syntax?, unsupported_version?

Constructor Details

This class inherits a constructor from RubyNext::Language::Rewriters::Base

Instance Method Details

#process_def(node) ⇒ Object



11
12
13
14
15
# File 'lib/ruby-next/language/rewriters/3.1/endless_method_command.rb', line 11

def process_def(node)
  return node unless command?(node)

  super(node)
end

#process_defs(node) ⇒ Object



17
18
19
20
21
# File 'lib/ruby-next/language/rewriters/3.1/endless_method_command.rb', line 17

def process_defs(node)
  return node unless command?(node)

  super(node)
end