From b3a13e5845b92ae9520b93113c4030114b2d6331 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 6 Jun 2022 13:27:42 -0700 Subject: Automatically define a method for ICs. --- test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test.rb') diff --git a/test.rb b/test.rb index 269c9d0..d462053 100755 --- a/test.rb +++ b/test.rb @@ -7,13 +7,13 @@ nl = Lace::Netlist.new do vcc = net("vcc") gnd = net("gnd") - define_singleton_method(:inverter, stock_ic("inverter", "CD74HC04") do | ic | + stock_ic("inverter", "CD74HC04") do | ic | vcc - ic[14] - c("100nF") - ic[7] - gnd - end) + end - define_singleton_method(:nand, stock_ic("nand", "CD74HC00") do | ic | + stock_ic("nand", "CD74HC00") do | ic | vcc - ic[14] - c("100nF") - ic[7] - gnd - end) + end g = net("g") o = net("o") -- cgit v1.2.3