Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/print_steps.rb

Instance Method Summary collapse

Instance Method Details



2
3
4
5
6
7
8
9
10
# File 'lib/print_steps.rb', line 2

def print_steps
  puts '' and return nil

  (1..self).each do |step_length|
    puts (1..step_length).to_a.join ' '
  end

  nil
end