Skip to content

Instantly share code, notes, and snippets.

@jxpx777
Created November 7, 2012 16:04
Show Gist options
  • Save jxpx777/4032463 to your computer and use it in GitHub Desktop.
Save jxpx777/4032463 to your computer and use it in GitHub Desktop.
Simple example against using bang methods
#!/usr/bin/env ruby
class FunTime
def initialize
@array = ['foo', 'bar', 'zing']
end
def gimme_bar
hinky
bar = @array[1]
puts bar.inspect
end
def hinky
@array.sort!
end
end
FunTime.new.gimme_bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment