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.
46 47 48 |
# File 'lib/nanoc/core/assertions.rb', line 46 def initialize(path:) @path = path end |
Instance Method Details
#call ⇒ Object
51 52 53 |
# File 'lib/nanoc/core/assertions.rb', line 51 def call Pathname.new(@path).absolute? end |