Class: Driskell::Listen::Adapter::Config
- Inherits:
-
Object
- Object
- Driskell::Listen::Adapter::Config
- Defined in:
- lib/driskell-listen/adapter/config.rb
Instance Attribute Summary collapse
-
#adapter_options ⇒ Object
readonly
Returns the value of attribute adapter_options.
-
#directories ⇒ Object
readonly
Returns the value of attribute directories.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#silencer ⇒ Object
readonly
Returns the value of attribute silencer.
Instance Method Summary collapse
-
#initialize(directories, queue, silencer, adapter_options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(directories, queue, silencer, adapter_options) ⇒ Config
Returns a new instance of Config.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/driskell-listen/adapter/config.rb', line 11 def initialize(directories, queue, silencer, ) # Default to current directory if no directories are supplied directories = [Dir.pwd] if directories.to_a.empty? # TODO: fix (flatten, array, compact?) @directories = directories.map do |directory| Pathname.new(directory.to_s).realpath end @silencer = silencer @queue = queue @adapter_options = end |
Instance Attribute Details
#adapter_options ⇒ Object (readonly)
Returns the value of attribute adapter_options.
9 10 11 |
# File 'lib/driskell-listen/adapter/config.rb', line 9 def @adapter_options end |
#directories ⇒ Object (readonly)
Returns the value of attribute directories.
6 7 8 |
# File 'lib/driskell-listen/adapter/config.rb', line 6 def directories @directories end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
8 9 10 |
# File 'lib/driskell-listen/adapter/config.rb', line 8 def queue @queue end |
#silencer ⇒ Object (readonly)
Returns the value of attribute silencer.
7 8 9 |
# File 'lib/driskell-listen/adapter/config.rb', line 7 def silencer @silencer end |