Class: Ftpmock::Configuration
- Inherits:
-
Object
- Object
- Ftpmock::Configuration
- Defined in:
- lib/ftpmock/configuration.rb
Instance Attribute Summary collapse
- #path ⇒ Object
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize(path: nil, verbose: true) ⇒ Configuration
constructor
A new instance of Configuration.
- #rspec? ⇒ Boolean
- #test_dir ⇒ Object
Constructor Details
#initialize(path: nil, verbose: true) ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 |
# File 'lib/ftpmock/configuration.rb', line 16 def initialize(path: nil, verbose: true) @path = path @verbose = verbose end |
Instance Attribute Details
#path ⇒ Object
21 22 23 |
# File 'lib/ftpmock/configuration.rb', line 21 def path @path ||= "#{test_dir}/ftp_records" end |
#verbose ⇒ Object
Returns the value of attribute verbose.
14 15 16 |
# File 'lib/ftpmock/configuration.rb', line 14 def verbose @verbose end |
Instance Method Details
#rspec? ⇒ Boolean
29 30 31 |
# File 'lib/ftpmock/configuration.rb', line 29 def rspec? defined?(RSpec) end |
#test_dir ⇒ Object
25 26 27 |
# File 'lib/ftpmock/configuration.rb', line 25 def test_dir rspec? ? 'spec' : 'test' end |