Class: Seafoam::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/seafoam/graph.rb

Overview

A control-flow basic block

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, nodes) ⇒ Block

Returns a new instance of Block.



137
138
139
140
# File 'lib/seafoam/graph.rb', line 137

def initialize(id, nodes)
  @id = id
  @nodes = nodes
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



135
136
137
# File 'lib/seafoam/graph.rb', line 135

def id
  @id
end

#nodesObject (readonly)

Returns the value of attribute nodes.



135
136
137
# File 'lib/seafoam/graph.rb', line 135

def nodes
  @nodes
end

Instance Method Details

#inspectObject

Inspect.



143
144
145
# File 'lib/seafoam/graph.rb', line 143

def inspect
  "<Block #{id}>"
end