All pastes #108489 Raw Edit

Untitled

public text v1 · immutable
#108489 ·published 2006-07-31 14:51 UTC
rendered paste body
-> 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)