rename method to_file

change method name from write to to_file
as it makes more sense for what it is is doing
and what it returns
bug/bundler_fix
David Maloney 2014-06-16 18:03:06 -05:00
parent 95beaa4f7e
commit a81b0ed17b
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 14 additions and 12 deletions

View File

@ -367,6 +367,19 @@ module Metasploit
@mutation_keys ||= generate_mutation_keys
end
# This method takes all the options provided and streams the generated wordlist out
# to a {Rex::Quickfile} and returns the {Rex::Quickfile}.
#
# @return [Rex::Quickfile] The {Rex::Quickfile} object that the wordlist has been written to
def to_file
valid!
wordlist_file = Rex::Quickfile.new("jtrtmp")
each_word do |word|
wordlist_file.puts word
end
wordlist_file
end
# Raise an exception if the attributes are not valid.
#
# @raise [Invalid] if the attributes are not valid on this scanner
@ -378,18 +391,7 @@ module Metasploit
nil
end
# This method takes all the options provided and streams the generated wordlist out
# to a {Rex::Quickfile} and returns the {Rex::Quickfile}.
#
# @return [Rex::Quickfile] The {Rex::Quickfile} object that the wordlist has been written to
def write
valid!
wordlist_file = Rex::Quickfile.new("jtrtmp")
each_word do |word|
wordlist_file.puts word
end
wordlist_file
end
private