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.



54
55
56
57
58
# File 'lib/nanoc/core/assertions.rb', line 54

def initialize(path:)
  super()

  @path = path
end

Instance Method Details

#callObject



61
62
63
# File 'lib/nanoc/core/assertions.rb', line 61

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