Module: Adept::JTAG::TAPStates
- Defined in:
- lib/adept/jtag/tap_state.rb,
lib/adept/jtag/tap_states.rb
Defined Under Namespace
Class Method Summary collapse
-
.tap_state(name, next_state) ⇒ Object
Dynamically create a new TAPState module.
Class Method Details
.tap_state(name, next_state) ⇒ Object
Dynamically create a new TAPState module.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/adept/jtag/tap_state.rb', line 49 def self.tap_state(name, next_state) #Create a new Module for the new TAP state... mod = Module.new #... and assign it the given name. self.const_set(name, mod) #Add the TAPState methods to the new module... mod.extend(TAPState) #And set the module's NextState constant, as given. mod.const_set(:NextState, next_state) end |