BoldLine = Struct.new(:color) do LineWidth = 10 def showWidth puts "width is #{LineWidth}" endendline = BoldLine.new("red")line.showWidth