Untitled
public text v1 · immutable-> Fichier NorthStar/tools.rb
class Tools
def version
return "0.1a"
end
def ping
return "pong"
end
def ip_to_int(address)
return address
end
def int_to_ip
end
end
-> Fichier tests.rb
#!/usr/bin/ruby
require 'NorthStar/Tools.rb'
ip = '192.168.0.1'
puts Tools.ip_to_int(ip)
-> execution
./tests.rb
./tests.rb:7: undefined method `ip_to_int' for Tools:Class (NoMethodError)