Sorry to keep replying to my own message, but I figured it out:
:property :baz, String, :default => Proc.new { |r,p| "prefix-string"
+
r.bar }
On Jul 21, 9:03 am, Bruce <[email protected]> wrote:
> I should read the docs better. Would this work?
>
> :property :baz, String, :default => { |r,p| "prefix-string" +
> r.bar.read }
>
> On Jul 21, 8:54 am, Bruce <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I want to do something like this:
>
> > class Foo
>
> > :property :bar, String
> > :property :baz, String, :default => { "prefix-string" + :bar }
>
> > end
>
> > Is something like this possible?
>
> > Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.