Friday, 27 September 2013

what's the nature of property in ruby class?

what's the nature of property in ruby class?

In ruby, there is something very strange which I can't understand. Those
keywords in class like attr_reader or property in the following example.
class Voiture
attr_reader :name
attr_writer :name
property :id, Serial
property :name, String
property :completed_at, DateTime
end
How does it works ?How can I create my own ? What's that ? Function, method ?
class MyClass
mymagickstuff :hello
end

No comments:

Post a Comment