Class: Nanoc::Core::Assertions::PathIsAbsolute

Inherits:
Base
  • Object
show all
Includes:
ContractsSupport
Defined in:
lib/nanoc/core/assertions.rb

Instance Method Summary collapse

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

#callObject



51
52
53
# File 'lib/nanoc/core/assertions.rb', line 51

def call
  Pathname.new(@path).absolute?
end