Class: Spoonerize::Config
- Inherits:
-
Object
- Object
- Spoonerize::Config
- Defined in:
- lib/spoonerize/config.rb
Instance Attribute Summary collapse
-
#excluded_words ⇒ Array
Words that should not be altered.
-
#lazy ⇒ Boolean
Lazy mode.
-
#lazy_words ⇒ Array
Words to skip when
lazyis true. -
#logfile_name ⇒ String
Name of the log file.
-
#reverse ⇒ Boolean
When true, reverse the order of the flipping.
Instance Method Summary collapse
-
#initialize ⇒ Spoonerize::Config
constructor
Create instance of Config.
Constructor Details
#initialize ⇒ Spoonerize::Config
Create instance of Config.
40 41 42 43 44 45 46 47 48 |
# File 'lib/spoonerize/config.rb', line 40 def initialize @lazy = false @lazy_words = %w[i a an and in of the my your his her him hers to is] @excluded_words = [] @reverse = false @logfile_name = File.( File.join(ENV["HOME"], ".cache", "spoonerize", "spoonerize.csv") ) end |
Instance Attribute Details
#excluded_words ⇒ Array
Words that should not be altered.
21 22 23 |
# File 'lib/spoonerize/config.rb', line 21 def excluded_words @excluded_words end |
#lazy ⇒ Boolean
Lazy mode. If true, words in lazy_words will not be altered.
9 10 11 |
# File 'lib/spoonerize/config.rb', line 9 def lazy @lazy end |
#lazy_words ⇒ Array
Words to skip when lazy is true.
15 16 17 |
# File 'lib/spoonerize/config.rb', line 15 def lazy_words @lazy_words end |
#logfile_name ⇒ String
Name of the log file. Should be a fully-qualified file path.
34 35 36 |
# File 'lib/spoonerize/config.rb', line 34 def logfile_name @logfile_name end |
#reverse ⇒ Boolean
When true, reverse the order of the flipping. Only makes a difference when there are more than two flip-able words.
28 29 30 |
# File 'lib/spoonerize/config.rb', line 28 def reverse @reverse end |