Class: ValueGraphTransformation::Value

Inherits:
Graph::Vertex show all
Defined in:
lib/value_graph_transformation/value.rb

Overview

Represents a value, which can be identified with a fixed number or a variable identifier.

Specifications

is a Vertex

Instance Attribute Summary (collapse)

Attributes inherited from Graph::Vertex

#sources, #targets

Instance Method Summary (collapse)

Methods inherited from Graph::Vertex

#source_vertices, #target_vertices

Constructor Details

- (Value) initialize(identifier = nil)

Returns a new instance of Value



11
12
13
14
15
# File 'lib/value_graph_transformation/value.rb', line 11

def initialize(identifier=nil)
  super()
  @identifiers = []
  @identifiers << identifier unless identifier.nil?
end

Instance Attribute Details

- (Array<Object>) identifiers (readonly)

Returns the identifiers of this value.

Returns:

  • (Array<Object>)

    the identifiers of this value.



9
10
11
# File 'lib/value_graph_transformation/value.rb', line 9

def identifiers
  @identifiers
end