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.



105
106
107
108
# File 'lib/seafoam/graph.rb', line 105

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



103
104
105
# File 'lib/seafoam/graph.rb', line 103

def id
  @id
end

#nodesObject (readonly)

Returns the value of attribute nodes.



103
104
105
# File 'lib/seafoam/graph.rb', line 103

def nodes
  @nodes
end

Instance Method Details

#inspectObject

Inspect.



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

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