class NOTcircuit attr_reader :x def initialize(x: 0) @x = x end def cause begin @x = Integer(gets.chomp) rescue end end def not_circuit(value) (value == 0)? 1 : 0 end def result puts not_circuit(@x) end def run cause result end end if $0 == __FILE__ NOTcircuit.new.run end