Skip to content

Instantly share code, notes, and snippets.

@mhfs
Created January 9, 2010 17:45
Show Gist options
  • Save mhfs/273000 to your computer and use it in GitHub Desktop.
Save mhfs/273000 to your computer and use it in GitHub Desktop.
# My Method
def mymethod
# My puts
puts "Ruby Rocks"
end
# lines = []
# file = File.open('code.txt')
# file.each { |line| lines << line unless line =~ /^\s*#\s*/ or line =~ /^\n$/}
lines = File.readlines('code.txt').delete_if { |line| line =~ /^\s*#\s*/ or line =~ /^\n$/ }
puts lines
def mymethod
puts "Ruby Apavora"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment