Class: Guard::RSpecFormatterResultsPath
- Inherits:
-
Object
- Object
- Guard::RSpecFormatterResultsPath
- Defined in:
- lib/guard/rspec_formatter_results_path.rb
Overview
Just a wrapper class for the results file filename
Constant Summary collapse
- WIKI_ENV_WARN_URL =
"https://github.com/guard/guard-rspec/wiki/Warning:-no-environment". freeze
- NO_ENV_WARNING_MSG =
"no environment passed - see #{WIKI_ENV_WARN_URL}".freeze
- NO_RESULTS_VALUE_MSG =
":results_file value unknown (using defaults)".freeze
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize ⇒ RSpecFormatterResultsPath
constructor
A new instance of RSpecFormatterResultsPath.
Constructor Details
#initialize ⇒ RSpecFormatterResultsPath
Returns a new instance of RSpecFormatterResultsPath.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/guard/rspec_formatter_results_path.rb', line 18 def initialize path = ENV["GUARD_RSPEC_RESULTS_FILE"] if path.nil? STDERR.puts("Guard::RSpec: Warning: #{NO_ENV_WARNING_MSG}\n" \ "Guard::RSpec: Warning: #{NO_RESULTS_VALUE_MSG}") path = RSpecDefaults::TEMPORARY_FILE_PATH end @path = File.(path) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
16 17 18 |
# File 'lib/guard/rspec_formatter_results_path.rb', line 16 def path @path end |