doc/tutorial.txt in og-0.31.0 vs doc/tutorial.txt in og-0.40.0
- old
+ new
@@ -89,38 +89,38 @@
facilitate attaching metadata to the object's attributes. An
attribute that contains metadata is called a property. For
each attr* method, there is a corresponding prop* method. That is,
attr => prop
- attr_accessor => prop_accessor
+ attr_accessor => attr_accessor
attr_reader => prop_reader
attr_writer => prop_writer
Here are the class definitions using the property mechanism:
require 'og'
class Category
- prop_accessor :name, String
+ attr_accessor :name, String
end
class Post
- prop_accessor :title, String
- prop_accessor :body, String
- prop_accessor :author, String
- prop_accessor :create_time, Time
- prop_accessor :hits, Fixnum
+ attr_accessor :title, String
+ attr_accessor :body, String
+ attr_accessor :author, String
+ attr_accessor :create_time, Time
+ attr_accessor :hits, Fixnum
end
class Comment
- prop_accessor :title, String
- prop_accessor :body, String
- prop_accessor :author, String
- prop_accessor :create_time, Time
+ attr_accessor :title, String
+ attr_accessor :body, String
+ attr_accessor :author, String
+ attr_accessor :create_time, Time
end
-Notice that the prop_accessor works similar to Ruby's attr_accessor.
+Notice that the attr_accessor works similar to Ruby's attr_accessor.
Here are some examples:
prop :title, true, String
prop_reader :title, :body, :author, String
@@ -152,11 +152,11 @@
db = Og::Database.new(
:database => 'test',
:adapter => 'psql',
:user => 'postgres',
- :password => 'navelrulez'
+ :password => 'gmrulez'
)
Now you are ready to save your first object into Postgres. Add the following code:
# create the object
@@ -572,11 +572,11 @@
db = Og::Database.new(
:database => 'test',
:adapter => 'mysql',
:user => 'postgres',
- :password => 'navelrulez'
+ :password => 'gmrulez'
)
A new MySQL database is automatically created along with all tables, indices, etc. You get all
this with changing only one line of code!
@@ -585,10 +585,10 @@
You betcha! You can to find more about Og by reading the available RDoc documentation and browsing the examples.
For any questions regarding Og, feel free to ask on the ruby-talk
mailing list (which is mirrored to comp.lang.ruby) or contact
-mailto:gm@navel.gr.
+mailto:george.moschovitis@gmail.com.
A Nitro specific mailing list is also available. You can post questions about
Og to this list. Please subscribe to nitro-general@rubyforge.com. The homepage
for this list is available here: