Module: Reek::AST::SexpExtensions::ArgNodeBase Private
- Included in:
- ArgNode, BlockargNode, KwargNode, KwoptargNode, KwrestargNode, OptargNode, RestargNode, ShadowargNode
- Defined in:
- lib/reek/ast/sexp_extensions.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Base module for utility methods for argument nodes.
Instance Method Summary collapse
-
#==(other) ⇒ Object
private
Other is a symbol?.
- #anonymous_splat? ⇒ Boolean private
- #block? ⇒ Boolean private
- #components ⇒ Object private
- #marked_unused? ⇒ Boolean private
- #name ⇒ Object private
- #optional_argument? ⇒ Boolean private
- #plain_name ⇒ Object private
Instance Method Details
#==(other) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Other is a symbol?
18 19 20 |
# File 'lib/reek/ast/sexp_extensions.rb', line 18 def ==(other) name == other end |
#anonymous_splat? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/reek/ast/sexp_extensions.rb', line 38 def anonymous_splat? false end |
#block? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/reek/ast/sexp_extensions.rb', line 30 def block? false end |
#components ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 |
# File 'lib/reek/ast/sexp_extensions.rb', line 42 def components [self] end |
#marked_unused? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/reek/ast/sexp_extensions.rb', line 22 def marked_unused? plain_name.start_with?('_') end |
#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/reek/ast/sexp_extensions.rb', line 13 def name children.first end |
#optional_argument? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/reek/ast/sexp_extensions.rb', line 34 def optional_argument? false end |
#plain_name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/reek/ast/sexp_extensions.rb', line 26 def plain_name name.to_s end |