class Dictionary

Attributes

words[R]

Public Class Methods

new(file_name) click to toggle source
# File lib/passwords_generator/dictionary.rb, line 5
def initialize file_name
  @words = if file_name.nil? 
    File.open("#{File.dirname(__FILE__)}/dictionary.txt") {|file| file.read.split(' ')}
  else
    File.open("#{file_name}") {|file| file.read.split(' ')}
  end
end