Class: Reek::SmellDetectors::NestedIterators::Iterator

Inherits:
Struct
  • Object
show all
Defined in:
lib/reek/smell_detectors/nested_iterators.rb

Overview

Struct for conveniently associating iterators with their depth (that is, their nesting).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#depthObject

Returns the value of attribute depth

Returns:

  • (Object)

    the current value of depth



15
16
17
# File 'lib/reek/smell_detectors/nested_iterators.rb', line 15

def depth
  @depth
end

#expObject

Returns the value of attribute exp

Returns:

  • (Object)

    the current value of exp



15
16
17
# File 'lib/reek/smell_detectors/nested_iterators.rb', line 15

def exp
  @exp
end

Instance Method Details

#lineObject



16
17
18
# File 'lib/reek/smell_detectors/nested_iterators.rb', line 16

def line
  exp.line
end