Module: VhdlDoctest::Types
- Defined in:
- lib/vhdl_doctest/types.rb,
lib/vhdl_doctest/types/std_logic.rb,
lib/vhdl_doctest/types/std_logic_vector.rb
Defined Under Namespace
Classes: StdLogic, StdLogicVector
Class Method Summary collapse
Class Method Details
.parse(str) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/vhdl_doctest/types.rb', line 6 def self.parse(str) Types.constants.each do |c| klass = const_get("#{c}") next unless klass.respond_to?(:parse) if result = klass.parse(str) return result end end raise "Type for #{str} is not found." end |