Top Level Namespace

Defined Under Namespace

Modules: StudioGame

Instance Method Summary collapse

Instance Method Details

#conversationObject



1
2
3
4
5
# File 'lib/studio_game/iterators.rb', line 1

def conversation
  puts "Hello!"
  yield
  puts "Goodbye!"
end

#n_times(n) ⇒ Object



9
10
11
12
13
# File 'lib/studio_game/iterators.rb', line 9

def n_times(n)
  1.upto(n) { |i|
    yield(i)
  }
end