Class: Anagram::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/anagram/options.rb

Constant Summary collapse

DEFAULT_DICTIONARY =
'/usr/share/dict/words'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Options

Returns a new instance of Options.



9
10
11
12
13
# File 'lib/anagram/options.rb', line 9

def initialize(argv)
  @dictionary = DEFAULT_DICTIONARY
  parse(argv)
  @words_to_find = argv
end

Instance Attribute Details

#dictionaryObject (readonly)

Returns the value of attribute dictionary.



7
8
9
# File 'lib/anagram/options.rb', line 7

def dictionary
  @dictionary
end

#words_to_findObject (readonly)

Returns the value of attribute words_to_find.



7
8
9
# File 'lib/anagram/options.rb', line 7

def words_to_find
  @words_to_find
end