Class: Spoonerize::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/spoonerize/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSpoonerize::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.expand_path(
    File.join(ENV["HOME"], ".cache", "spoonerize", "spoonerize.csv")
  )
end

Instance Attribute Details

#excluded_wordsArray

Words that should not be altered.

Returns:

  • (Array)


21
22
23
# File 'lib/spoonerize/config.rb', line 21

def excluded_words
  @excluded_words
end

#lazyBoolean

Lazy mode. If true, words in lazy_words will not be altered.

Returns:

  • (Boolean)


9
10
11
# File 'lib/spoonerize/config.rb', line 9

def lazy
  @lazy
end

#lazy_wordsArray

Words to skip when lazy is true.

Returns:

  • (Array)


15
16
17
# File 'lib/spoonerize/config.rb', line 15

def lazy_words
  @lazy_words
end

#logfile_nameString

Name of the log file. Should be a fully-qualified file path.

Returns:

  • (String)


34
35
36
# File 'lib/spoonerize/config.rb', line 34

def logfile_name
  @logfile_name
end

#reverseBoolean

When true, reverse the order of the flipping. Only makes a difference when there are more than two flip-able words.

Returns:

  • (Boolean)


28
29
30
# File 'lib/spoonerize/config.rb', line 28

def reverse
  @reverse
end