Class: ComputedModel::Plan::Node Private

Inherits:
Object
  • Object
show all
Defined in:
lib/computed_model/plan.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 set of information necessary to invoke the loader or the computed def.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, deps, subfields) ⇒ Node

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 Node.

Parameters:

  • name (Symbol)

    field name

  • deps (Set<Symbol>)

    set of dependency names

  • subfields (ComputedModel::NormalizableArray)

    subfield selectors, payloads sent to the dependency



41
42
43
44
45
# File 'lib/computed_model/plan.rb', line 41

def initialize(name, deps, subfields)
  @name = name
  @deps = deps
  @subfields = subfields
end

Instance Attribute Details

#depsSet<Symbol> (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.

Returns set of dependency names.

Returns:

  • (Set<Symbol>)

    set of dependency names



34
35
36
# File 'lib/computed_model/plan.rb', line 34

def deps
  @deps
end

#nameSymbol (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.

Returns field name.

Returns:

  • (Symbol)

    field name



32
33
34
# File 'lib/computed_model/plan.rb', line 32

def name
  @name
end

#subfieldsComputedModel::NormalizableArray (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.

Returns subfield selectors, payloads sent to the dependency.

Returns:



36
37
38
# File 'lib/computed_model/plan.rb', line 36

def subfields
  @subfields
end