Class: Anagram::Options
- Inherits:
-
Object
- Object
- Anagram::Options
- Defined in:
- lib/anagram/options.rb
Constant Summary collapse
- DEFAULT_DICTIONARY =
'/usr/share/dict/words'
Instance Attribute Summary collapse
-
#dictionary ⇒ Object
readonly
Returns the value of attribute dictionary.
-
#words_to_find ⇒ Object
readonly
Returns the value of attribute words_to_find.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Options
constructor
A new instance of Options.
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
#dictionary ⇒ Object (readonly)
Returns the value of attribute dictionary.
7 8 9 |
# File 'lib/anagram/options.rb', line 7 def dictionary @dictionary end |
#words_to_find ⇒ Object (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 |