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.



113
114
115
116
# File 'lib/seafoam/graph.rb', line 113

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



111
112
113
# File 'lib/seafoam/graph.rb', line 111

def id
  @id
end

#nodesObject (readonly)

Returns the value of attribute nodes.



111
112
113
# File 'lib/seafoam/graph.rb', line 111

def nodes
  @nodes
end

Instance Method Details

#inspectObject

Inspect.



119
120
121
# File 'lib/seafoam/graph.rb', line 119

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