Class: VHDL_Parser::Package
- Inherits:
-
Object
- Object
- VHDL_Parser::Package
- Defined in:
- lib/vhdl_parser/package.rb
Overview
Represents a VHDL Package
Instance Attribute Summary collapse
-
#constants ⇒ Hash
A Hash of all the constants defined in this Package.
Instance Method Summary collapse
-
#initialize ⇒ Package
constructor
A new instance of Package.
-
#process ⇒ nil
Processes the constants defined in the package.
- #to_s ⇒ String
Constructor Details
#initialize ⇒ Package
Returns a new instance of Package.
9 10 11 |
# File 'lib/vhdl_parser/package.rb', line 9 def initialize @constants = Hash.new end |
Instance Attribute Details
#constants ⇒ Hash
A Hash of all the constants defined in this Package.
7 8 9 |
# File 'lib/vhdl_parser/package.rb', line 7 def constants @constants end |
Instance Method Details
#process ⇒ nil
Processes the constants defined in the package. This resolves constants being dependent on other constants in this package.
21 22 23 24 25 26 27 |
# File 'lib/vhdl_parser/package.rb', line 21 def process @constants.each do |k,v| @constants.each do |k2,v2| @constants[k2] = Utility.sub_constants(v2, k, v) end end end |