Class: Nanoc::Core::Assertions::PathIsAbsolute
- Includes:
- ContractsSupport
- Defined in:
- lib/nanoc/core/assertions.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path:) ⇒ PathIsAbsolute
constructor
A new instance of PathIsAbsolute.
Methods included from ContractsSupport
enabled?, included, setup_once, warn_about_performance
Constructor Details
#initialize(path:) ⇒ PathIsAbsolute
Returns a new instance of PathIsAbsolute.
54 55 56 57 58 |
# File 'lib/nanoc/core/assertions.rb', line 54 def initialize(path:) super() @path = path end |
Instance Method Details
#call ⇒ Object
61 62 63 |
# File 'lib/nanoc/core/assertions.rb', line 61 def call Pathname.new(@path).absolute? end |