Module: Reek::ParameterSet
- Defined in:
- lib/reek/block_context.rb
Instance Method Summary collapse
Instance Method Details
#include?(name) ⇒ Boolean
19 20 21 |
# File 'lib/reek/block_context.rb', line 19 def include?(name) names.include?(name) end |
#names ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/reek/block_context.rb', line 7 def names return @names if @names return (@names = []) if empty? arg = slice(1) case slice(0) when :masgn @names = arg[1..-1].map {|lasgn| Name.new(lasgn[1]) } when :lasgn, :iasgn @names = [Name.new(arg)] end end |