Thiago Massa wrote in post #1067793:
> Oh, what i mean by point is the dot or period.

And that's exactly what you've been shown.

If you want "obj.meth" to execute, then you need to define 'meth' within 
the class of obj (or within the singleton class of obj).

8 is a Fixnum (which is an Integer which is a Numeric). Since you may 
want this to work for Bignums too, then Integer is probably the right 
place to define it, since Integer is the common superclass of both 
Fixnum and Bignum.

class Integer
  def bits_to_bytes
    self/8
  end
end

puts 16.bits_to_bytes  # => 2

-- 
Posted via http://www.ruby-forum.com/.