Class: Nanoc::Core::ContractsSupport::EnabledContracts::AbsolutePathString

Inherits:
AbstractContract
  • Object
show all
Defined in:
lib/nanoc/core/contracts_support.rb

Class Method Summary collapse

Methods inherited from AbstractContract

[]

Class Method Details

.valid?(val) ⇒ Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/nanoc/core/contracts_support.rb', line 76

def self.valid?(val)
  val.is_a?(String) && Pathname.new(val).absolute?
end