Class: OllamaAgent::Topology::IR::ModuleNode

Inherits:
Data
  • Object
show all
Defined in:
lib/ollama_agent/topology/ir/module_node.rb

Overview

rubocop:disable Lint/DataDefineOverride – IR field name methods is part of the public contract.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#fqcnObject (readonly)

Returns the value of attribute fqcn

Returns:

  • (Object)

    the current value of fqcn



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def fqcn
  @fqcn
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def kind
  @kind
end

#methodsObject (readonly)

Returns the value of attribute methods

Returns:

  • (Object)

    the current value of methods



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def methods
  @methods
end

#module_chainObject (readonly)

Returns the value of attribute module_chain

Returns:

  • (Object)

    the current value of module_chain



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def module_chain
  @module_chain
end

#origin_extractor_versionObject (readonly)

Returns the value of attribute origin_extractor_version

Returns:

  • (Object)

    the current value of origin_extractor_version



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def origin_extractor_version
  @origin_extractor_version
end

#source_lineObject (readonly)

Returns the value of attribute source_line

Returns:

  • (Object)

    the current value of source_line



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def source_line
  @source_line
end

#source_pathObject (readonly)

Returns the value of attribute source_path

Returns:

  • (Object)

    the current value of source_path



7
8
9
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 7

def source_path
  @source_path
end

Class Method Details

.build(source_path:, source_line:, origin_extractor_version:, fqcn:, module_chain: [], methods: []) ⇒ Object

rubocop:disable Metrics/ParameterLists



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/ollama_agent/topology/ir/module_node.rb', line 17

def self.build(
  source_path:,
  source_line:,
  origin_extractor_version:,
  fqcn:,
  module_chain: [],
  methods: []
)
  # rubocop:enable Metrics/ParameterLists
  new(
    :module,
    source_path.to_s,
    Integer(source_line),
    origin_extractor_version.to_s,
    fqcn.to_s,
    Array(module_chain).map(&:to_s).freeze,
    IR.deep_freeze_hashes(methods)
  )
end