gmosx.myope: Dear devs,
is there an elegant way to find out if two Time objects represent the same day, ie ignore the hh:mm:ss part of the Time object in this comparisson?
thanks in advance,
-g.
Special compare of Ruby Time objects (0 replies)
, last by gmosx.myopenid.com, Mon, 21 May 2007 12:08:48 GMT
class User
attr_accessor :name, :age
end
u = User.new
u.name = "gmosx"
u.age = 32
u.to_xml
would generate:
gmosx
32
does something like this exist?
regards,..
Ruby meta programming problem (0 replies)
, last by gmosx.myopenid.com, Mon, 19 Mar 2007 09:53:02 GMT
<
class User::Proxy
attr_accessor :oid
attr_accessor :name
attr_accessor :level
for key, val in User::LEVEL_VALUES
define_method("#{val}?") do
@level >= key
end
..
Subscribe to Ruby