Class: WkhtmltopdfRunner::PathValidator
- Inherits:
-
Object
- Object
- WkhtmltopdfRunner::PathValidator
- Defined in:
- lib/wkhtmltopdf_runner/path_validator.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ PathValidator
constructor
A new instance of PathValidator.
- #validate! ⇒ Object
Constructor Details
#initialize(path) ⇒ PathValidator
Returns a new instance of PathValidator.
11 12 13 |
# File 'lib/wkhtmltopdf_runner/path_validator.rb', line 11 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/wkhtmltopdf_runner/path_validator.rb', line 9 def path @path end |
Class Method Details
.validate!(path) ⇒ Object
5 6 7 |
# File 'lib/wkhtmltopdf_runner/path_validator.rb', line 5 def self.validate!(path) new(path).validate! end |
Instance Method Details
#validate! ⇒ Object
15 16 17 18 19 20 |
# File 'lib/wkhtmltopdf_runner/path_validator.rb', line 15 def validate! validate_if_path_exists! validate_if_path_executable! true end |