Class: Nanoc::Core::Dependency Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A dependency between two items/layouts.

Constant Summary collapse

C_OBJ_FROM =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

C::Or[
Nanoc::Core::Item,
Nanoc::Core::Layout,
Nanoc::Core::Configuration,
Nanoc::Core::IdentifiableCollection]
C_OBJ_TO =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Nanoc::Core::Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ContractsSupport

enabled?, included, setup_once, warn_about_performance

Constructor Details

#initialize(from, to, props) ⇒ Dependency

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Dependency.



29
30
31
32
33
# File 'lib/nanoc/core/dependency.rb', line 29

def initialize(from, to, props)
  @from  = from
  @to    = to
  @props = props
end

Instance Attribute Details

#fromObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/nanoc/core/dependency.rb', line 18

def from
  @from
end

#propsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



24
25
26
# File 'lib/nanoc/core/dependency.rb', line 24

def props
  @props
end

#toObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21
22
23
# File 'lib/nanoc/core/dependency.rb', line 21

def to
  @to
end

Instance Method Details

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



36
37
38
# File 'lib/nanoc/core/dependency.rb', line 36

def inspect
  "Dependency(#{@from.inspect} -> #{@to.inspect}, #{@props.inspect})"
end