class Object

Public Instance Methods

convert1(digit) click to toggle source
# File lib/a_lcdnumbers/converter.rb, line 1
def convert1(digit)
        n=digit.to_i
        
        case n
                when 1
                        print "  "
                when 2
                        print " ___ "

                when 3
                        print" ___ "
                when 4
                        print"     "
                when 5 
                        print" ___ "
                when 6 
                        print" ___ "
                when 7 
                        print" ___ " 
                when 8 
                        print" ___ "
                when 9 
                        print" ___ "
                when 0
                        print" ___ "
                else 
                        puts""
                end  
end
convert2(digit) click to toggle source
# File lib/a_lcdnumbers/converter.rb, line 30
def convert2(digit)
        n=digit.to_i
        
        case n
                when 1
                        print " |"
                when 2
                        print "    |"
        when 3
                        print"    |"
                when 4
                        print"|   |"
                when 5 
                        print"|    "
                when 6 
                        print"|    "
                when 7 
                        print"    |" 
                when 8 
                        print"|   |"
                when 9 
                        print"|   |"
                when 0
                        print"|   |"
                else 
                        puts""
                end  
end
convert3(digit) click to toggle source
# File lib/a_lcdnumbers/converter.rb, line 58
def convert3(digit)
        n=digit.to_i
        
        case n
                when 1
                        print " |"
                when 2
                        print" ___|"
        when 3
                        print" ___|"
                when 4
                        print"|___|"
                when 5 
                        print"|___ "
                when 6 
                        print"|___ "
                when 7 
                        print"    |" 
                when 8 
                        print"|___|"
                when 9 
                        print"|___|"
                when 0
                        print"|   |"
                else 
                        puts""
                end  
end
convert4(digit) click to toggle source
# File lib/a_lcdnumbers/converter.rb, line 86
def convert4(digit)
        n=digit.to_i
        
        case n
                when 1
                        print " |"
                when 2
                        print "|    "
        when 3
                        print"    |"
                when 4
                        print"    |"
                when 5 
                        print"    |"
                when 6 
                        print"|   |"
                when 7 
                        print"    |" 
                when 8 
                        print"|   |"
                when 9 
                        print"    |"
                when 0
                        print"|   |"
                else 
                        puts""
                end  
end
convert5(digit) click to toggle source
# File lib/a_lcdnumbers/converter.rb, line 114
def convert5(digit)
        n=digit.to_i
        
        case n
                when 1
                        print " |"
                when 2
                        print "|___ "
        when 3
                        print" ___|"
                when 4
                        print"    |"
                when 5 
                        print" ___|"
                when 6 
                        print"|___|"
                when 7 
                        print"    |" 
                when 8 
                        print"|___|"
                when 9 
                        print" ___|"
                when 0
                        print"|___|"
                else 
                        puts ""
                end  
end