Top Level Namespace
Defined Under Namespace
Classes: Array, Fixnum, Float, String
Instance Method Summary collapse
-
#quickWrite(file, item) ⇒ Object
Random methods and class modifiers to add to my own gem.
-
#scan_file(file, thing) ⇒ Object
fix this thing.
Instance Method Details
#quickWrite(file, item) ⇒ Object
Random methods and class modifiers to add to my own gem
3 4 5 6 7 |
# File 'lib/random_methods.rb', line 3 def quickWrite(file, item) somefile = open(file, 'a') somefile.puts item somefile.close end |
#scan_file(file, thing) ⇒ Object
fix this thing
9 10 11 12 13 14 15 16 17 |
# File 'lib/random_methods.rb', line 9 def scan_file(file, thing) # fix this thing somefile = open(file, 'r') somefile.readlines do |line| if line.match(/#{thing}/) then return true end end somefile.close end |