Skip to content

Instantly share code, notes, and snippets.

@teamon
Created Oct 2, 2009
Embed
What would you like to do?
>> a = Lecture.new
=> #<Lecture @id=nil @name=nil @description=nil @date=nil @created_at=nil @faculty_id=nil @user_id=nil @lecturer_id=nil>
>> a.date = {"month"=>"08", "hour"=>"11", "day"=>"2", "year"=>"2009", "min"=>"45"}
=> {"month"=>"08", "hour"=>"11", "day"=>"2", "min"=>"45", "year"=>"2009"}
>> a.date
=> {"month"=>"08", "hour"=>"11", "day"=>"2", "min"=>"45", "year"=>"2009"}
>>
>> a = Lecture.new
=> #<Lecture id=nil name=nil description=nil date=nil created_at=nil faculty_id=nil user_id=nil>
>> a.date = {"month"=>"08", "hour"=>"11", "day"=>"2", "year"=>"2009", "min"=>"45"}
=> {"month"=>"08", "hour"=>"11", "day"=>"2", "min"=>"45", "year"=>"2009"}
>> a.date
=> #<DateTime: 212115973559/86400,0,2299161>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment