class BaseChip::BomType
Public Class Methods
new(bom,type)
click to toggle source
# File lib/base_chip/bom_file.rb, line 19 def initialize(bom,type) @bom = bom @type = type end
Public Instance Methods
make()
click to toggle source
# File lib/base_chip/bom_file.rb, line 26 def make f = File.open(to_s,'w') case @type when :text ; f.puts @bom.to_a.join("\n") when :tcl ; fault "TCL formatted bom files not yet implemented" else ; fault "#{@type.inspect} was not understood by #{self.class}" end f.close end
to_s()
click to toggle source
# File lib/base_chip/bom_file.rb, line 23 def to_s "#{@bom.name1}.#{@bom.name2}.#{@type}" end